RE: [XSLT20] line ends in unparsed-text()

> 
> following up on an earlier comment (and Michael Kay's reply)
> 
> http://lists.w3.org/Archives/Public/public-qt-comments/2004Aug
> /0086.html
> 
> I see in the new XSLT draft that unparsed-text() doesn't 
> normalize line
> ends. I think normalizing would be better but I can live with this.

We made this decision because people felt there might be applications that
needed to treat the choice of line ending as significant - for example they
might be checking the input for conformance against a specification that
mandates the choice of line ending.
> 
> A new example has been added to clarify that line ends are not
> normalized, which is good (if they are not to be normalized) 
> however it
> says...
> 
>   Note that the unparsed-text function does not normalize line
>   endings. This example has therefore been written to recognize both
>   Unix and Windows conventions for end-of-line, namely a 
> single newline
>   (#x0A) character or a carriage return / line feed pair (#x0D #x0A).
> 
> This explicitly leaves out Mac users and more importantly I think the
> example ought to show the equivalent normalization to XML 1.0 (and
> describe it as such, rather than by reference to specific operating
> systems)

The only reason I didn't do this is the danger of getting such examples
wrong. From bitter experience, I'm reluctant to include examples without
testing them, and testing all possible variations of line endings is not
something that gets me leaping out of bed in the morning. Examples are there
to clarify the specification, not to provide code that the user can take
advantage of in real applications.

Michael Kay

Received on Friday, 26 November 2004 10:25:50 UTC