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 28368 - [XSLT30] Clarify that circularity errors in variables or keys cannot be caught with try/catch
Summary: [XSLT30] Clarify that circularity errors in variables or keys cannot be caugh...
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Member-only Editors Drafts
Hardware: PC Windows NT
: 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: 2015-03-29 19:16 UTC by Abel Braaksma
Modified: 2015-10-29 09:50 UTC (History)
0 users

See Also:


Attachments

Description Abel Braaksma 2015-03-29 19:16:51 UTC
As an example, if we were to allow catching this error, it is not clear whether the following would yield CAUGHT or STUMPED:

<xsl:variable name="t">
 <xsl:try>
   <xsl:value-of select="$u" />
   <xsl:catch errors="err:XTDE0640">
     CAUGHT
   </xsl:catch>
 </xsl:try>
</xsl:variable>

<xsl:variable name="u">
 <xsl:try>
   <xsl:value-of select="$t" />
   <xsl:catch errors="err:XTDE0640">
     STUMPED
   </xsl:catch>
 </xsl:try>
</xsl:variable>

Hence it makes sense to disallow catching the dynamic error XTDE0640.

The preceding discussion on this bug and origin of example can be found in the mail archive (member only)
* https://lists.w3.org/Archives/Member/w3c-xsl-wg/2015Mar/0067.html
* https://lists.w3.org/Archives/Member/w3c-xsl-wg/2015Mar/0068.html
Comment 1 Michael Kay 2015-04-16 22:48:21 UTC
I added the following to the section on circularities:

<p diff="add" at="S-bug28368">Although a circularity is detected as a dynamic error, there is no unique instruction whose evaluation triggers the error condition, and the result of any attempt to catch the error using an <elcode>xsl:try</elcode> instruction is therefore <termref def="dt-implementation-dependent"/>.</p>