- From: <bugzilla@jessica.w3.org>
- Date: Wed, 23 Nov 2011 21:32:08 +0000
- To: public-qt-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=14917 Summary: Normalization of line endings in XPath Product: XPath / XQuery / XSLT Version: Recommendation Platform: PC OS/Version: All Status: NEW Severity: normal Priority: P2 Component: XPath 2.0 AssignedTo: jonathan.robie@gmail.com ReportedBy: mike@saxonica.com QAContact: public-qt-comments@w3.org XPath 2.0 (and also 3.0) contains a statement (in A.2.3 line endings) that line endings in XPath expressions should be normalized according to the XML rules. This is highly undesirable when XPath is embedded in XML (as for example in XSLT and XSD), because the line ending normalization has already been done by the XML processor. This means that it is impossible to represent a character such as x0D: writing it as 
 will prevent the XML parser normalizing it away, but this doesn't stop the XPath processor normalizing the resulting x0D character; and since character references are not recognized in XPath, there is no other way of expressing this character. Furthermore, this is an undocumented incompatibility with XSLT 1.0. I suspect the only reason this has gone unnoticed is that the major XSLT 2.0 processors have not implemented this clause in the specification. The statement first appeared in the draft of 15 September 2005, as a response to bug #1307. This bug was raised against XQuery only, but the resolution that was accepted changed both XPath and XQuery. (The decision is recorded in the minutes of meeting 266, July 2005) In the 7 July 2005 XQuery draft the change log states: "Removed from the main part of the document any references to line-ending normalization. Affects 3.1.1 (Literals) and 3.7.1.3 (Dir. Elem. Constructor--Content, Rule 1a). Responds to Bug 1307. Line ending normalization will be applied globally by the parser rather than by individual expressions." The effect of this decision was to change line-ending normalization from being XQuery-only to something that applied to XPath as well. There are a number of tests in the XSLT 2.0 conformance test suite that clearly assume writing a character reference such as 
 will prevent end-of-ilne normalization. Examples are satest-035 and unicode-001. -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Wednesday, 23 November 2011 21:32:14 UTC