W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2004

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

From: Michael Kay <mhk@mhk.me.uk>
Date: Fri, 26 Nov 2004 10:25:17 -0000
To: "'David Carlisle'" <davidc@nag.co.uk>, <public-qt-comments@w3.org>
Message-ID: <E1CXdIU-0006HB-Fd@frink.w3.org>

> 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:02 UTC