<?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>7087</bug_id>
          
          <creation_ts>2009-07-07 16:42:26 +0000</creation_ts>
          <short_desc>[XQuery11] syntax errors in try-catch examples</short_desc>
          <delta_ts>2009-08-25 10:13:56 +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>XQuery 3.0</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>needsReview</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Kraska">tim</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>jim.melton</cc>
          
          <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>25894</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Kraska">tim</who>
    <bug_when>2009-07-07 16:42:26 +0000</bug_when>
    <thetext>- &quot;$x cast as integer&quot; should be &quot;$x cast as xs:integer&quot;

- &quot;define function&quot; should be &quot;declare function&quot;

- Instead of XPST0051 would not be the error code FORG0001 better?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25961</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2009-07-14 15:58:16 +0000</bug_when>
    <thetext>Why do you prefer the FORG error?

I will fix the rest editorially.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25962</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2009-07-14 16:06:07 +0000</bug_when>
    <thetext>Ah, I see the problem - the examples attempt to catch static errors:

#

A try/catch expression without a CatchErrorList catches any error:


The CatchErrorList in this try/catch expression specifies that only err:XPST0051 is caught:

try {
    $x cast as integer
}
catch err:XPST0051 {
    0
}

#

The CatchErrorList in this try/catch expression specifies that errors err:XPST0051 and err:XPST0032 are caught:

try {
    $x cast as integer
}
catch err:XPST0051 | err:XPST0032 {
    0
}


I&apos;ll fix that, you can&apos;t catch a static error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26640</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2009-08-25 10:13:56 +0000</bug_when>
    <thetext>Fixed, will show up in next internal commit.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>