[Bug 29099] New: try-catch-variable-binding-outside-4 should be modified so that err:XPTY0004 can not be detected during static evaluation

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29099

            Bug ID: 29099
           Summary: try-catch-variable-binding-outside-4 should be
                    modified so that err:XPTY0004 can not be detected
                    during static evaluation
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3 & XPath 3 Test Suite
          Assignee: oneil@saxonica.com
          Reporter: josh.spiegel@oracle.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

<test-case name="try-catch-variable-binding-outside-4"
xmlns="http://www.w3.org/2010/09/qt-fots-catalog">
    <description>If a variable reference is used in a try clause, errors raised
by binding a value to the variable are not caught unless the binding expression
occurs within the try clause.</description>
    <created by="Ghislain Fourny" on="2011-07-28"/>
    <environment ref="err"/>
    <test><![CDATA[try { for $x as xs:integer in (0, 1, "") return $x } catch
err:XPTY0004 { 0 }]]></test>
    <result>
      <assert-eq>0</assert-eq>
    </result>
  </test-case>

Implementations may be able to detect XPTY0004 and raise it during static
evaluation. Here is one way to prevent detection during static evaluation:

   declare variable $str external := "";
   try {
      for $x as xs:integer in (0, 1, $str)
      return $x
   } catch err:XPTY0004 {
      0
   }

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 28 August 2015 21:40:15 UTC