View Full Version : How to put a space character with xsl

08-13-2002, 03:01 PM
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>

08-13-2002, 04:50 PM
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>

08-13-2002, 05:53 PM
Thanks I will try this :)