[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Identity Transform losing original line feed
At 2008-07-18 16:29 -0700, Karl Stubsjoen wrote:
I have a number of xsl templates which I am running an identity transform on: An XML processor is obliged to transform all end-of-line sequences into a line-feed character. My proof of this is a simple, open in notepad, where before the transform I have line spaces, and after the transform I do not. I *never* use indent="yes" with the identity transform because I'm not convinced all processors treat the white-space-only text nodes the same (or close to the same) when indented. When I use the identity transform I leave indent="no" in order to preserve the original input file indentation ... you said you wanted to preserve the original templates exactly, so don't ask the processor to do arbitrary indentation. But as for the line feed character, if you use CR-LF or CR you will end up with just LF in the output because of XML rules, not because of XSLT rules. If you are using XSLT 2 and you want to force your output to be CR-LF then use the output character-map facility to get this. I hope this helps. . . . . . . . . . . . Ken
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|