<?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>28764</bug_id>
          
          <creation_ts>2015-06-04 20:03:42 +0000</creation_ts>
          <short_desc>[XSLT30] (editorial) xsl:assert should only ever raise XTMM9001</short_desc>
          <delta_ts>2015-10-29 09:50:35 +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>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="Abel Braaksma">abel.braaksma</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>120718</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-06-04 20:03:42 +0000</bug_when>
    <thetext>This bug originated in the mail: https://lists.w3.org/Archives/Member/w3c-xsl-wg/2015May/0012.html (member only).

This bug was discussed and its resolution as mentioned in that mail was ACCEPTED by the WG at the 2015-06-04 telcon, minutes: https://lists.w3.org/Archives/Member/w3c-xsl-wg/2015Jun/0011.html (member only).

Rationale:

Assertions are meant to test pre-conditions and, in line with best-practices from TDD, should have one of two outcomes: either succeed, or fail in a determinate manner, that means that even in light of an error, they should fail with their own predefined error.

Note that we currently say in 22.2 (which seems to suggest this):

&lt;quote&gt;
The expression in the test attribute is evaluated. If the effective boolean value of the result is true, the assertion succeeds, and no further action is taken. If the effective boolean value is false, or if a dynamic error occurs during evaluation of the expression, then the assertion fails.
&lt;/quote&gt;

Resolution:

As discussed in the 2015-06-04 telcon and ACCEPTED, if an error occurs during evaluation of a xsl:assert&apos;s @test attribute or sequence constructor, this should only ever raise XTMM9001 (or whatever is in the @code attribute). This should be mentioned so in the text of xsl:assert.

NOTE: marked editorial after finding out that the original text mildly hints in this direction, though I think we should emphasize that an error in the test-expression is never raised, always cloaked.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120725</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-06-05 13:02:10 +0000</bug_when>
    <thetext>I think this is the status quo, but I will add text to make this more clear.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>