<?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>5236</bug_id>
          
          <creation_ts>2007-10-30 15:02:56 +0000</creation_ts>
          <short_desc>[XQuery] err:XPST0008 vs. err:XPST0081</short_desc>
          <delta_ts>2008-01-09 09:25:18 +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 1.0</component>
          <version>Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</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="Tim Mills">tim</reporter>
          <assigned_to name="Don Chamberlin">chamberl</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>17514</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2007-10-30 15:02:56 +0000</bug_when>
    <thetext>XPST0081 is defined to be:

&quot;It is a static error if a QName used in a query contains a namespace prefix that cannot be expanded into a namespace URI by using the statically known namespaces.&quot;

XPST0005 is defined to be:

&quot;It is a static error if an expression refers to an ... namespace prefix, or ... that is not defined in the static context, except for an ElementName in an ElementTest or an AttributeName in an AttributeTest.&quot;


XPST0081 seems to cover one of the cases of XPST0008 (namely undefined namespace prefixes).  I may be wrong, but I suspect XPST0008 can therefore never be thrown in that case and should be defined as:

&quot;It is a static error if an expression refers to an element name, attribute name, schema type name, or variable name that is not defined in the static context, except for an ElementName in an ElementTest or an AttributeName in an AttributeTest.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18250</commentid>
    <comment_count>1</comment_count>
    <who name="Don Chamberlin">chamberl</who>
    <bug_when>2008-01-08 19:13:09 +0000</bug_when>
    <thetext>Tim,
The Query working group discussed this bug report on 8 Jan 2008. The group observed that the XQuery specification does not in general guarantee that error conditions are not overlapping. Section 2.3.1 of the specification states &quot;If more than one error is present, or if an error condition comes within the scope of more than one error defined in this specification, then any non-empty subset of these errors may be reported.&quot; For example, if both XPST0008 and XPST0081 apply to a given expression, then either or both of these errors may be raised.
If you accept this resolution, please mark this bug report as &quot;Closed&quot;.
Regards,
--Don Chamberlin (for the XQuery working group)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18257</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2008-01-09 09:25:18 +0000</bug_when>
    <thetext>OK.  I would like to suggest that in any future version of XQuery which supports some sort of try/catch mechanism, it would be nice if error conditions were non-overlapping, as this might aid interoperability.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>