<?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>22925</bug_id>
          
          <creation_ts>2013-08-12 16:59:13 +0000</creation_ts>
          <short_desc>[XSLT 3.0] Effect of @as attribute on streamability</short_desc>
          <delta_ts>2014-05-15 14:00:20 +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>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</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="Michael Kay">mike</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>91915</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2013-08-12 16:59:13 +0000</bug_when>
    <thetext>It was noted in the NY F2F minutes:

In xsl:with-param, we might take into account the sweep of the expression
if the @as forces atomization.

In fact this is equally true for other variable binding elements.

I think we can add to the list of node-value contexts in section 19.3.1:

* The expression in the select attribute, or the contained sequence constructor, of an xsl:variable, xsl:param, or xsl:with-param element, if the element has an &quot;as&quot; attribute whose value is a SequenceType that exclusively permits atomic values and/or functions

* The contained sequence constructor of an xsl:variable, xsl:param, or xsl:with-param element, if the element has no &quot;as&quot; attribute

Rationale: both these situations prevent the value of the variable being a node in a streamed document.

In the list of node-value contexts we currently have:

* the select attribute of one of the instructions xsl:analyze-string, xsl:attribute, xsl:comment, xsl:copy, xsl:copy-of, xsl:namespace, xsl:processing-instruction, xsl:value-of

we should add xsl:message and xsl:assert to the list. We should also add the sequence constructors contained in all these instructions with the exception of analyze-string; in all these cases the supplied value will be either copied or atomized.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91916</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2013-08-12 17:03:31 +0000</bug_when>
    <thetext>The sequence constructor of a literal result element falls into the same category: the result is always copied.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91924</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2013-08-12 20:30:41 +0000</bug_when>
    <thetext>Changes applied, subject to WG review.

A careful trawl of XSLT instructions revealed quite a few more cases where the result of an expression is always atomized or copied, for example the value attribute of xsl:number and the key attribute of xsl:map-entry, and these have been added to the list.

For xsl:with-param on xsl:call-template, the @as attribute of the corresponding xsl:template/xsl:param is taken into account. This is consistent with the treatment of parameters to function calls.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>