<?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>16369</bug_id>
          
          <creation_ts>2012-03-14 15:19:10 +0000</creation_ts>
          <short_desc>[FO30] Invoking fn:error with a static error code.</short_desc>
          <delta_ts>2012-03-20 18:24:57 +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>Functions and Operators 3.0</component>
          <version>Working drafts</version>
          <rep_platform>All</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></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ghislain Fourny">g</reporter>
          <assigned_to name="Michael Kay">mike</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>65518</commentid>
    <comment_count>0</comment_count>
    <who name="Ghislain Fourny">g</who>
    <bug_when>2012-03-14 15:19:10 +0000</bug_when>
    <thetext>I am unsure about the behavior of this query with respect to the spec and versus what one could expect. Perhaps I just overlooked something?

declare namespace err= &quot;http://www.w3.org/2005/xqt-errors&quot;;
try {
  fn:error(xs:QName(&quot;err:XPST0008&quot;))
} catch err:XPST0008 { 0 }

Possibility 1. F&amp;O says that &quot;the effect of the error is identical to the effect of dynamic errors raised implicitly&quot;. It would mean that the error, since it is dynamic, is caught and 0 is returned.
Possibility 2. It is a static error code so one could also expect that it is not caught (although it has been raised dynamically?).

Or, alternatively, would it make sense to raise a dynamic error err:XQDY.... if fn:error is invoked with an error code that is defined in a specification and that is a static error code?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65531</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-03-14 17:42:07 +0000</bug_when>
    <thetext>I think that whether an error is static or dynamic is a property of the error, not a property of its QName. Calling the error() function always raises a dynamic error. The fact that the QName is more commonly associated with a static error doesn&apos;t change this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65858</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-03-20 18:24:57 +0000</bug_when>
    <thetext>The WG decided to accept the resolution in comment #1.

A non-normative note will be added to the error() function to explain this situation.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>