Re: Plain Text Handling in XSLT Output
white space nodes in a stylesheet are stripped by default) (so you can indent your xsl code without affecting the result. various ways to change the default the easiest is to use <xsl:text>...</xsl:text> so <xsl:value-of select="Firstname"/> <xsl:value-of select="Lastname"/> could be <xsl:value-of select="Firstname"/> <xsl:text> </xsl:text> <xsl:value-of select="Lastname"/> or <xsl:value-of select="concat(Firstname,' ',Lastname)"/> or (in XSLT2) <xsl:value-of select="Firstname,Lastname"/> "> (< That node is not white space it;s a newline a bunch of spaces and a ( so is not stripped and appears as is in the result. Golden rule is always put all text in an xsl:text element if you are indenting code "> <xsl:text>(</xsl:text> <xsl:value-of ... now the indentation spaces are in white space text nodes and so are ignored. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
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