PDA

View Full Version : how to insert whitespace in xsl?


f0rtr3n
10-17-2005, 07:40 PM
i need to simply insert tabs after certain fields in my output from my xsl file. does anyone have any ideas how to do this...i have searched high and low and i cant find anything. thanks in advance.

KC-Luck
10-17-2005, 09:01 PM
<xsl:text>& #9;</xsl:text>

or i prefer to always have

<xsl:variable name="n" select="'& #13;'"/>
<xsl:variable name="t" select="'& #9;'"/>
<xsl:variable name="nt" select="concat($n,$t)"/>

and can call upon later
<xsl:value-of select="$nt"/>
thus, creating a newline + tab after it.

NOTE: do not include the space between & # in your code.
only done here to not have it swapped to the actual tabs/newline.