This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Escaping newlines in an XSL file
- From: David Carlisle <davidc at nag dot co dot uk>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 5 Jun 2002 11:22:08 +0100
- Subject: Re: [xsl] Escaping newlines in an XSL file
- References: <63C4AD0365821F4291ACF76C0672FA3506EE91@piper6.piper-group.int>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Ahh the joys of whitespace. Here why not use <xsl:text>?
<xsl:template match="/RECORD">
<xsl:value-of select="child::ELEMENT_1"/><xsl:text>,</xsl:text>
<xsl:value-of select="child::ELEMENT_2"/><xsl:text>,...</xsl:text>
<xsl:value-of select="child::ELEMENT_n"/>
</xsl:template>
This should give you control over what appears in your output
Or
<xsl:template match="/RECORD">
<xsl:value-of select="concat(ELEMENT_1,
',',
ELEMENT_2,
',...',
ELEMENT_n)"/>
</xsl:template>
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list