[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How to preserve whitespace in the stylesheet?
I have the following template rule <xsl:template name="separated-list"> <xsl:param name="nodes"/> <xsl:param name="separator"/> <xsl:for-each select="$nodes"> <xsl:value-of select="."/> <xsl:if test="position() != last()"> <xsl:value-of select="$separator"/> </xsl:if> </xsl:for-each> </xsl:template> Sometimes separator is "," and other times it's a <BR> or that's the plan. However, I'm getting hung up on XSLT stripping the whitespace from the tree obtained from the stylesheet. How can I ensure that the whitespace in this case in preserved? I call this rule thus <xsl:call-template name="separated-list"> <xsl:with-param name="nodes" select="note"/> <xsl:with-param name="separator"> <BR/> </xsl:with-param> </xsl:call-template> also, where is it documented exactly why you cannot do <xsl:text><BR/><xsl:text>? XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|