<?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>21315</bug_id>
          
          <creation_ts>2013-03-17 16:21:28 +0000</creation_ts>
          <short_desc>[XP3.0] XPDY0002 - type error or dynamic error</short_desc>
          <delta_ts>2013-04-16 17:21:59 +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>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</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="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>84528</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2013-03-17 16:21:28 +0000</bug_when>
    <thetext>The error XPDY0002 which occurs when the context item is absent is generally described in the XPath spec as a dynamic error but in the F+O spec as a type error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86296</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2013-04-16 15:34:05 +0000</bug_when>
    <thetext>For reference:

err:XPDY0002
It is a dynamic error if evaluation of an expression relies on some part of the dynamic context that is absentDM30 .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86304</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2013-04-16 16:12:40 +0000</bug_when>
    <thetext>I propose that we keep this as a dynamic error, and modify the following text:

&lt;quote&gt; if an implementation can determine during the static analysis phase that a QueryBody &lt;add&gt;or FunctionBody&lt;/add&gt;, if evaluated, would necessarily raise a dynamic error or that an expression, if evaluated, would necessarily raise a type error, the implementation may (but is not required to) report that error during the static analysis phase.  &lt;add&gt;However, a FunctionBody should not raise such  error statically simply because invoking the function would invoke fn:error().&lt;/quote&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86305</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2013-04-16 16:21:39 +0000</bug_when>
    <thetext>I believe the status quo is that it is a dynamic error. I think our choices are:

* Keep the status quo, make consistent in F&amp;O
* Change to a type error
* Keep the status quo, make consistent in F&amp;O, and allow dynamic errors to be raised statically in a function body.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86307</commentid>
    <comment_count>4</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2013-04-16 16:32:19 +0000</bug_when>
    <thetext>The Working Groups have decided XPDY0002 is a dynamic error, and F&amp;O will be changed to reflect that.

We will not make the change proposed in Comment #2 during CR because it is too large a change at this stage of our progression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86310</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2013-04-16 17:21:59 +0000</bug_when>
    <thetext>Test cases try-016 and try-017 added.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>