<?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>13204</bug_id>
          
          <creation_ts>2011-07-11 10:16:26 +0000</creation_ts>
          <short_desc>[XP 3.0] XPTY0019 vs XPTY0020</short_desc>
          <delta_ts>2013-06-19 08:23:43 +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>XPath 3.0</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WORKSFORME</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="Michael Kay">mike</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</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>50894</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-07-11 10:16:26 +0000</bug_when>
    <thetext>With the introduction of try/catch, predictability of error codes is becoming increasingly important. There seems to be a big overlap between XPTY0019 and XPTY0020.

Given the expression

23/x

when we look at the rules for the &quot;/&quot; operator, we raise XPTY0019 because the LHS is not a node; but when we look at the rules for the axis step &quot;x&quot;, we raise XPTY0020 because the context item is not a node. There&apos;s no indication of which of these takes precedence. However, when the RHS of &quot;/&quot; is something other than an Axis Step, XPTY0019 is the only permitted error code; but when an Axis Step appears other than on the RHS of &quot;/&quot; (for example 23[x]), XPTY0020 is the only permitted code.

I&apos;m finding it almost impossible to keep enough information through tree rewrites to maintain these distinctions: for example it means that &quot;for $x in ABC where $x/@a return $x&quot; cannot safely be rewritten as ABC[@a].

So I would like to propose that all uses of XPTY0019 be replaced by XPTY0020.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51582</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-07-27 22:06:50 +0000</bug_when>
    <thetext>The WG decided to make no change to the specification.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>