<?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>3576</bug_id>
          
          <creation_ts>2006-08-02 14:28:56 +0000</creation_ts>
          <short_desc>static-context-1 should raise XPTY0004</short_desc>
          <delta_ts>2006-12-11 20:43:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Query Test Suite</product>
          <component>XML Query Test Suite</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</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>
          <dependson>3650</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Marc Van Cappellen">marc.van.cappellen</reporter>
          <assigned_to name="Carmelo Montanez">carmelo</assigned_to>
          <cc>simeon</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>10995</commentid>
    <comment_count>0</comment_count>
    <who name="Marc Van Cappellen">marc.van.cappellen</who>
    <bug_when>2006-08-02 14:28:56 +0000</bug_when>
    <thetext>The test static-context-1 expects today XPST0001.
We believe that, if not the only correct answer, that at least XPTY0004 should be added as an alternate expected error code.

The query is as follows:
  declare namespace test = &apos;http://www.example.com&apos;; 
  &lt;a/&gt; instance of element(*, test:unknownType)

Why XPTY0004?

instance of refers to the sequencetype mathcing rules. In &quot;2.5.4 SequenceType Matching&quot; we read:
&quot;derives-from(AT, ET) raises a type error [err:XPTY0004] if:
  ET is an unknown type, or
 ...&quot;

Why not XPST0001?

The description of XPST0001 reads as follows:
It is a static error if analysis of 
an expression relies on some component of the static context 
that has not been assigned a value.

The error description clearly says &quot;some component has not been 
assigned a value&quot;. Ok, test:unknownType is not known to the &quot;In-scope schema defintions&quot;. But still, there is a value assigned to the &quot;In-scope schema defintions&quot; in our implementation.

Thanks,
Marc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11013</commentid>
    <comment_count>1</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2006-08-03 18:17:38 +0000</bug_when>
    <thetext>You&apos;ve made a good case for adding XPTY0004.

I&apos;m less convinced that XPST0001 should be removed. As you say, the error description says &quot;some component has not been assigned a value&quot;. Without thinking, I had expanded this error to include missing definitions within the In-Scope Schema Definitions.

Perhaps Jerome will give us an opinion on whether XPST0001 should be retained.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11015</commentid>
    <comment_count>2</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-08-03 20:31:00 +0000</bug_when>
    <thetext>Marc:

Thanks for the commnet.  I added the extra expected error code.  Will leave the bug open for now, pending an answer from Jerome.

Thanks,
Carmelo
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11081</commentid>
    <comment_count>3</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2006-08-10 05:12:02 +0000</bug_when>
    <thetext>That&apos;s a tricky case here I think. I admit my opinion is that the spec is unclear.

My first intuition is that XPST0001 should takes precedence. I.e., checking whether the type &apos;test:unkonwnType&apos; is in the context, should occur before type matching is applied. A corrolary of that is that I think bullet &apos;1 ET is an unknown type&apos; should actually never be used.

Because of the way the spec is written now, I would assume that keeping both
error codes in the test suite is the right thing to do as implementations may actually do either one of those. But I would recommend asking the working group to clarify this.

sorry I can&apos;t give a more definite answer to this right now.
Best,
- Jerome
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11340</commentid>
    <comment_count>4</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-08-31 15:10:30 +0000</bug_when>
    <thetext>Does anyone knows if the Working Group will look into this?.  Otherwise, I will
close the BUG as fixed with both error codes allowed.

Thanks,
Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11371</commentid>
    <comment_count>5</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2006-09-04 13:42:59 +0000</bug_when>
    <thetext>They will now:

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3650


Frans</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11515</commentid>
    <comment_count>6</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-09-08 14:24:13 +0000</bug_when>
    <thetext>All:

We will wait a resolution from the working group as requested on

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3650

Thanks,
Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12061</commentid>
    <comment_count>7</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-09-26 17:38:20 +0000</bug_when>
    <thetext>Mark:

Given the response from the WG that teh are in question is a bit unclear, both codes will be left on the expected set of results from the time being.

Thanks,
Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12501</commentid>
    <comment_count>8</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2006-10-16 20:49:07 +0000</bug_when>
    <thetext>Reopening; the working group has resolved this bug now, and the error code is not XPST0001 nor XPTY0004, but XPST0008:

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3650


Frans</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13134</commentid>
    <comment_count>9</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-12-11 20:43:51 +0000</bug_when>
    <thetext>Marc/Frans et all:

Thanks for the follow up on this.  I chnaged the catalog file to reflect the new code.

Thanks,
Carmelo</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>