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 26543 - [xslt30] Circularities, and errors in patterns
Summary: [xslt30] Circularities, and errors in patterns
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Working drafts
Hardware: PC All
: 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: 2014-08-08 13:57 UTC by Michael Kay
Modified: 2015-03-30 18:36 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2014-08-08 13:57:05 UTC
In 9.11, circular definitions, we have several examples of circularities involving patterns:

Example: Circularity involving Variables and Templates

<xsl:variable name="x">
  <xsl:apply-templates select="//param[1]"/>
</xsl:variable>

<xsl:template match="param[$x]">1</xsl:template>

Example: Circularity involving Variables and Keys

<xsl:variable name="x" select="my:f(10, /)"/>

<xsl:function name="my:f">
  <xsl:param name="arg1"/>
  <xsl:param name="top"/>
  <xsl:sequence select="key('k', $arg1, $top)"/>
</xsl:function>

<xsl:key name="k" match="item[@code=$x]" use="@desc"/>

But we say in 5.6.4 that a dynamic error in evaluating a pattern does not cause the transformation to fail, it causes the pattern to not match. This suggests that these two examples should no longer be errors.

Alternatively we could say that the rule about not reporting errors in patterns does not apply to circularity errors.

Affects test case error-code-195.
Comment 1 Michael Kay 2014-08-21 17:06:53 UTC
The WG decided today that when a circularity is detected, it must be reported, and this overrides the rule that dynamic errors in evaluating patterns are normally masked.
Comment 2 Michael Kay 2014-08-22 11:30:03 UTC
The changes have been applied.
Comment 3 Abel Braaksma 2015-03-30 18:36:19 UTC
Update: fixed in the XT3 testsuite.