This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: whitespace
- From: "J.Pietschmann" <j3322ptm at yahoo dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 30 May 2002 00:50:14 +0200
- Subject: Re: [xsl] whitespace
- References: <578B1976.79A94528.503A7C16@netscape.net>
- Reply-to: xsl-list at lists dot mulberrytech dot com
normbishop1@netscape.net wrote:
...
> <xsl:output method="text" version="1.0" indent="yes" />
>
> <xsl:template match ="/address" xml:space="preserve">
> <xsl:value-of select="firstname" />
> </xsl:template>
> </xsl:stylesheet>
The xml:space preserves the whitespace in the *XSLT*, i.e.
the linefeed after the <xsl:template..> opening tag, the
indentation of the next line with the <xsl:value-of.../>
element and the linefeed after this and the indentation
of the next line.
Which all doesnt matter because the serializer reformats
the output because of the indent="yes" in the xsl:output.
Try
<xsl:template match ="/address">
<test><xsl:value-of select="firstname" /></test>
</xsl:template>
you should see
<test> Mike</test>
somewhere in the output.
J.Pietschmann
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list