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 24515 - xsl:call-template can statically determine streamability of called template
Summary: xsl:call-template can statically determine streamability of called template
Status: CLOSED LATER
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows NT
: P2 enhancement
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: 2014-02-05 04:50 UTC by Abel Braaksma
Modified: 2014-05-15 14:00 UTC (History)
2 users (show)

See Also:


Attachments

Description Abel Braaksma 2014-02-05 04:50:17 UTC
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:

<xsl:mode streamable="yes" name="streamable" />
<xsl:template match="foo" mode="streamable" name="bar">
   <xsl:copy-of select="." />
</xsl:template>

<xsl:template match="/">
   <xsl:call-template name="bar" />
</xsl:template>

Because we can statically determine that the template with the name "bar" 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).
Comment 1 Michael Kay 2014-02-05 11:23:03 UTC
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.
Comment 2 Abel Braaksma 2014-02-11 16:01:13 UTC
Since we already have such a rule already for xsl:mode, I think such a rule would be in line with existing ones.
Comment 3 C. M. Sperberg-McQueen 2014-02-11 16:09:10 UTC
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.