This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE : white space removal
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE : [xsl] white space removal
- From: Philippe Barthélémy <philippe dot barthelemy at bdesign dot fr>
- Date: Mon, 30 Jul 2001 16:56:27 +0200
- Reply-To: xsl-list at lists dot mulberrytech dot com
Well, I do not understood the answer.
Let's say my XML looks like :
_____________
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="testxslt.xsl"?>
<root>
<toto/>
<toto/>
<toto/>
</root>
_____________
let's say my XSL looks like :
_____________
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8"
indent="yes"/>
<xsl:template match="toto">
kjlkjlk
</xsl:template>
</xsl:stylesheet>
______________
Then my XSL output looks like :
______________
<?xml version="1.0" encoding="UTF-16"?>
kjlkjlk
kjlkjlk
kjlkjlk
______________
And I would have liked to have :
_________
<?xml version="1.0" encoding="UTF-16"?>kjlkjlkkjlkjlkkjlkjlk
_________
That is none of the white spaces in the XSL finding their way in the XSL
output.
Is that feasible ?
Thanks in advance.
--Philippe
-----Message d'origine-----
De : Michael Kay [mailto:mhkay@iclway.co.uk]
Envoyé : lundi 30 juillet 2001 12:35
À : xsl-list@lists.mulberrytech.com
Objet : RE: [xsl] white space removal
> This sheet is quite long, so for the sake of clarity, the XSL code is
> indented. The problem is that all the tabs and carriage
> returns that are
> in the XSL code are "copied" in the RTF output. This is something I do
> not want.
Only those that are in the same text node as a non-whitespace character
will
be copied.
The solution is to wrap all significant text (that you do want output)
in
<xsl:text> elements.
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list