<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>28202</bug_id>
          
          <creation_ts>2015-03-12 11:18:32 +0000</creation_ts>
          <short_desc>[XSLT30] Streamability of unparsed-entity-public-id and unparsed-entity are incorrect</short_desc>
          <delta_ts>2015-10-29 09:50:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XSLT 3.0</component>
          <version>Member-only Editors Drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Abel Braaksma">abel.braaksma</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>118549</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-03-12 11:18:32 +0000</bug_when>
    <thetext>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:

&lt;quote&gt;
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.
&lt;/quote&gt;

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.

&lt;quote&gt;
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
&lt;/quote&gt;

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&apos;s DTD is a motionless action, the rules can be simplified: 

&lt;proposal&gt;
If the context item is roaming, then roaming and free-ranging, otherwise grounded and motionless.
&lt;/proposal&gt;

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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118582</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-03-13 09:23:04 +0000</bug_when>
    <thetext>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 &quot;/ instance of document(element(X))&quot;.

I also noted that the sentence &quot;A streaming processor is required to read only as much of the source document as is needed to generate correct stylesheet output.&quot; is ambiguous: it&apos;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: &quot;A streaming processor is not required to read any more of the source document than is needed...&quot;.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>