This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: document.write & copy-of
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: document.write & copy-of
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Fri, 27 Oct 2000 12:26:52 +0100
- Reply-To: xsl-list at mulberrytech dot com
> But what is the purpose of empty <xsl:text /> instructions?
An empty <xsl:text/> instruction splits a text node into two, typically
making one of them a whitespace-only node that will be stripped from the
stylesheet.
Useful e.g. in
<xsl:attribute>
<xsl:text/>[<xsl:value-of select="$x"/>]<xsl:text/>
</xsl:attribute>
to prevent newlines in the output. You can't put an <xsl:text> element
around the <xsl:value-of>, it's not allowed to contain child elements, and
the alternative of
<xsl:text>[</xsl:text><xsl:value-of select="$x"/><xsl:text>]</xsl:text>
is even uglier.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list