This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28216 - [XSLT30] XPath 3.0 requires host languages to specify the kind of line ending normalization
Summary: [XSLT30] XPath 3.0 requires host languages to specify the kind of line ending...
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-15 11:57 UTC by Abel Braaksma
Modified: 2015-10-29 09:50 UTC (History)
0 users

See Also:


Attachments

Description Abel Braaksma 2015-03-15 11:57:28 UTC
The XPath 3.0 bug 14917, resolved during CR period, introduced the following requirement for host languages of XPath under A.2.3 End-of-Line Handling (http://www.w3.org/TR/xpath-30/#id-eol-handling):

<quote>
The host language must specify whether the XPath 3.0 processor normalizes all line breaks on input, before parsing, and if it does so, whether it uses the rules of [XML 1.0] or [XML 1.1].
</quote>

I tried to search using several keywords for whether we specify that normatively somewhere, but I couldn't find it. 

I think we ought to add somehow/somewhere specifically how line endings are (not) normalized for XPath expressions to meet this XPath 3.0 requirement (note: the bug also applies to earlier XPath versions and by extension to earlier XSLT versions).
Comment 1 Michael Kay 2015-03-20 12:53:39 UTC
Subject to WG approval, I have added the following text at the end of section 5.3:

<p diff="add" at="S-bug28216">The XPath specification states that the host language must specify whether the XPath processor normalizes all line breaks on input, before parsing, and if it does so, whether it uses the rules of [XML 1.0] or [XML 1.1]. In the case of XSLT, all handling of line breaks is the responsibility of the XML parser (which may support either XML 1.0 or XML 1.1); the XSLT and XPath processors make no further changes.</p>

<note><p diff="add" at="S-bug28216">Most XPath expressions in a stylesheet appear within XML attributes. They are therefore subject to XML line-ending normalization (for example, a CRLF sequence is normalized to LF) and also to XML attribute-value normalization, which replaces tabs and newlines by spaces. XPath expressions appearing in text value templates, however (see TVTs) are subject to line-ending normalization but not attribute value normalization). In both cases, normalization of whitespace can be prevented by using character references such as <code>&amp;#x9;</code>.</p></note>
Comment 2 Michael Kay 2015-04-16 16:56:52 UTC
The changes in comment #1 were accepted.