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

Re: RE: Saxon's handling of line breaks

Subject: Re: RE: Saxon's handling of line breaks
From: Mike Brown <mike@xxxxxxxx>
Date: Mon, 6 May 2002 16:31:28 -0600 (MDT)
explain cr and lf
Salvatore Mangano wrote:
> According to your explanation foo and bar should be seperated 
> by whatever is enclosed in the xsl:text element.

That's correct. But the xsl:text element in the stylesheet *tree*
contains the LF only, regardless of the fact that the original
document contained CR+LF.

> In this case it should be a CRLF combination because the
> stylesheet was created in an editor that writes out CR+LF
> at the end of line.

No, the stylesheet tree is what is being processed, not the
document that the tree came from.
 
> However, after processing the stylesheet the CR was indeed 
> stripped with saxon but not with xalan. Explain?

He did explain:

"Line breaks in the input document and the stylesheet are 
automatically converted to a single NL character by the
XML parser - that's defined by the XML standard."

(I think he meant LF, not NL.)

Remember that the stylesheet is an XML document that is parsed
in order to provide input to the XSLT processor, just like the
source document.

Whatever XML parser you are using to feed input to Xalan
(Xerces, I assume) is misbehaving if it preserves the CRs.
It might be preserving them, but I suspect that it is really
just making a note that the input had CR+LF and then
serializing the result tree the same way, while internally,
it is only seeing LF.

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

 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.