This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: whitespace
- From: "Thomas B. Passin" <tpassin at mitretek dot org>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 29 May 2002 18:23:29 -0400
- Subject: Re: [xsl] whitespace
- References: <578B1976.79A94528.503A7C16@netscape.net>
- Reply-to: xsl-list at lists dot mulberrytech dot com
This example worked as expected - the whitespace was retained in front of
the "Mike" - on Win2000, using XML Cooktop (using the msxml3 processor).
Tom P
[ <normbishop1@netscape.net>]
I am attaching the simplest version of the xsl and xml files.
<?xml version="1.0" encoding="iso-8859-1" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<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>
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type='text/xsl' href='test.xsl'?>
<address id="1234">
<firstname> Mike</firstname>
</address>
Thanks in advance!
Mike Brown wrote:
normbishop1@netscape.net wrote:
I've been struggling with yet another problem :(. Why does this white space
get truncated when transformation takes place? I do have
xml:space="preserve" in the xsl file. The xml line looks like this:
<firstname> Mike</firstname>
Under no circumstances should the spaces before the "Mike" disappear, but
I'm
not even clear on whether that's what you've got in the source or if that's
what you're seeing in the output. Explain what XSLT processor you are using
and reduce the problem to a simple, reproducible test case if you can.
- Mike
__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/
Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list