<?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>24515</bug_id>
          
          <creation_ts>2014-02-05 04:50:17 +0000</creation_ts>
          <short_desc>xsl:call-template can statically determine streamability of called template</short_desc>
          <delta_ts>2014-05-15 14:00:43 +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>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>LATER</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Abel Braaksma">abel.braaksma</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>abel.online</cc>
    
    <cc>cmsmcq</cc>
          
          <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>99749</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2014-02-05 04:50:17 +0000</bug_when>
    <thetext>We already have streamable modes and any templates in that mode are guaranteed streamable if the sequence constructor is grounded. The rules in 19.8.4.9 Streamability of xsl:call-template (http://www.w3.org/TR/xslt-30/#streamability-xsl-call-template) can be relaxed with that in mind. Consider:

&lt;xsl:mode streamable=&quot;yes&quot; name=&quot;streamable&quot; /&gt;
&lt;xsl:template match=&quot;foo&quot; mode=&quot;streamable&quot; name=&quot;bar&quot;&gt;
   &lt;xsl:copy-of select=&quot;.&quot; /&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match=&quot;/&quot;&gt;
   &lt;xsl:call-template name=&quot;bar&quot; /&gt;
&lt;/xsl:template&gt;

Because we can statically determine that the template with the name &quot;bar&quot; is also in a streamable mode, hence it is streamable, hence this call is allowed (which the current rules do not allow because of TDU restrictions).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99770</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-02-05 11:23:03 +0000</bug_when>
    <thetext>If we allowed this we would also need to introduce a constraint that such a named template cannot be overridden in a way that makes it non-streamable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100296</commentid>
    <comment_count>2</comment_count>
    <who name="Abel Braaksma">abel.online</who>
    <bug_when>2014-02-11 16:01:13 +0000</bug_when>
    <thetext>Since we already have such a rule already for xsl:mode, I think such a rule would be in line with existing ones.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100299</commentid>
    <comment_count>3</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2014-02-11 16:09:10 +0000</bug_when>
    <thetext>We discussed this in Prague and agreed that this would be at least a minor improvement in convenience.  The improvement does not have to be made, however, and any implementor can in fact offer it.  So on balance we inclined not to make the change.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>