Helpful Information
 
 
Category: XML
How to put a space character with xsl

I have pasted the code below. In that code I have two xsl:value-of select. In between these 2 I need to put a space. I tried   and also   but the 2 variables are being put together without a space. Say for example if the first variable is "my" and the second variable is "Flower", I want it to display "my Flower". But it is displaying "myFlower". Can any one help me with this?. I want a space where I am specifying "space here".

<xsl:variable name="MAIN-SUB-HEADING">{<xsl:value-of select="//PAGE-RESULTS/PAGE-ENTRY/I-DOCUMENT/EI-MAIN-HEADING"/>space here<xsl:value-of select="//PAGE-RESULTS/PAGE-ENTRY/EI-DOCUMENT/EI-SUB-HEADING"/>}</xsl:variable>

You can wrap a space in an <xsl:text> tag:

<xsl:variable name="MAIN-SUB-HEADING">{<xsl:value-of select="//PAGE-RESULTS/PAGE-ENTRY/I-DOCUMENT/EI-MAIN-HEADING"/><xsl:text> </xsl:text><xsl:value-of select="//PAGE-RESULTS/PAGE-ENTRY/EI-DOCUMENT/EI-SUB-HEADING"/>}</xsl:variable>

Thanks I will try this :)










privacy (GDPR)