[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE : white space removal

Subject: RE : white space removal
From: Philippe Barthélémy <philippe.barthelemy@xxxxxxxxxx>
Date: Mon, 30 Jul 2001 16:56:27 +0200
whitespace removal
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@xxxxxxxxxxxx] 
Envoyé?: lundi 30 juillet 2001 12:35
À?: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Objet?: RE:  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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.