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 28202 - [XSLT30] Streamability of unparsed-entity-public-id and unparsed-entity are incorrect
Summary: [XSLT30] Streamability of unparsed-entity-public-id and unparsed-entity are i...
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Member-only Editors 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-12 11:18 UTC by Abel Braaksma
Modified: 2015-10-29 09:50 UTC (History)
0 users

See Also:


Attachments

Description Abel Braaksma 2015-03-12 11:18:32 UTC
The rules for both these functions are the same. I see a few issues with the rules in section 19.8.8.19 Streamability of the unparsed-entity-public-id function:

<quote>
While processing the document node itself, however, the contents of the DTD might not yet be available. An arbitrary number of comments and processing instructions are allowed to precede the DTD.
</quote>

This is no longer true, for other constructs we have defined that reading up until the start of the (first) root element is a motionless action, even if it means reading comments and DTD contents.

<quote>
3. If the context posture is climbing, striding, or crawling, the context item type permits a document node, then the posture is crawling and the sweep is consuming
</quote>

The result posture should be grounded for this function, it returns an xs:string or an xs:anyURI.

The current text does not reflect that the first argument should be treated with GSR, usage absorption, and it does not reflect the new signature from bug 27839 (where the context item can be made explicit).

Also note that if we accept that reading the document's DTD is a motionless action, the rules can be simplified: 

<proposal>
If the context item is roaming, then roaming and free-ranging, otherwise grounded and motionless.
</proposal>

Which, in effect, means that both functions can be classified under section 19.8.8 Classifying Calls to Built-In Functions as having an argument of inspection, and these two sections (19.8.8.19 and 19.8.8.20) can be dropped:

* unparsed-entity-public-id(x), equivalent to unparsed-entity-public-uri(x, .)
* unparsed-entity-public-id(A, I)
* unparsed-entity(x), equivalent to unparsed-entity(x, .)
* unparsed-entity(A, I)
Comment 1 Michael Kay 2015-03-13 09:23:04 UTC
The WG accepted the correction.

I have taken the opportunity to tidy up section 4.6 (Data model for streaming) to update the discussion on look-ahead at the start of the document, including treatment of unparsed entities, comments and PIs at the start of the document, the lookahead needed to support has-children, and the use of "/ instance of document(element(X))".

I also noted that the sentence "A streaming processor is required to read only as much of the source document as is needed to generate correct stylesheet output." is ambiguous: it's not clear whether this places a requirement on the processor, or whether it indicates the absence of a requirement. The intended meaning is the latter, and I have rephrased accordingly: "A streaming processor is not required to read any more of the source document than is needed...".