<?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>6509</bug_id>
          
          <creation_ts>2009-01-30 22:32:54 +0000</creation_ts>
          <short_desc>K2-ExternalVariablesWith-23</short_desc>
          <delta_ts>2009-10-13 14:07:46 +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 NT</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="Michael Kay">mike</reporter>
          <assigned_to name="Frans Englich">frans.englich</assigned_to>
          <cc>jmdyck</cc>
    
    <cc>oliver</cc>
    
    <cc>tim</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>23361</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2009-01-30 22:32:54 +0000</bug_when>
    <thetext>The substance of this test is

declare variable $v as element(notWildCard, xs:untyped?)+ := &lt;e/&gt;

and the test expects this to be successful. It is a type error because the element name does not match the required name.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23645</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2009-02-11 17:12:37 +0000</bug_when>
    <thetext>K2-ExternalVariablesWith-22 has a related problem.

With the default construction mode of &quot;preserve&quot; the actual type of &lt;e/&gt; in each of these examples is element(e, xs:anyAtomicType).

(:*******************************************************:)
(: Test: K2-ExternalVariablesWith-22                     :)
(: Written by: Frans Englich                             :)
(: Date: 2007-11-22T11:31:21+01:00                       :)
(: Purpose: A complex type declaration.                  :)
(:*******************************************************:)
declare variable $v as element(*, xs:untyped?)+ := &lt;e/&gt;;
1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23658</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2009-02-11 21:30:27 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; With the default construction mode of &quot;preserve&quot; the actual type
&gt; of &lt;e/&gt; in each of these examples is element(e, xs:anyAtomicType).

If construction mode is preserve, the type annotation (type-name) of a
constructed element node is xs:anyType, so the actual type of &lt;e/&gt; would
be element(e, xs:anyType).

But I don&apos;t think that makes a difference to the problem you raise.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23666</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2009-02-12 10:27:31 +0000</bug_when>
    <thetext>Thanks - I did mean element(e, xs:anyType).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23900</commentid>
    <comment_count>4</comment_count>
    <who name="Oliver Hallam">oliver</who>
    <bug_when>2009-02-24 11:47:03 +0000</bug_when>
    <thetext>In both these tests, the variable is never used.  Under dynamic typing mode an implementation is free to never evaluate the definition of the global variable, and so never encounter the type error.  Thus I think &quot;1&quot; is also a valid result for both these tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28296</commentid>
    <comment_count>5</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2009-10-13 13:16:28 +0000</bug_when>
    <thetext>Seems to have been fixed in CVS on 2009/01/12 by me, but the report was never closed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28297</commentid>
    <comment_count>6</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2009-10-13 13:21:49 +0000</bug_when>
    <thetext>I&apos;m still seeing an error in K2-ExternalVariablesWith-23

Expected success, was XPTY0004: Type check error.  The declared type of variable &apos;$v&apos; in namespace &apos;&apos; is &apos;element notWildCard nillable of type http://www.w3.org/2001/XMLSchema:untyped+&apos; but its value has type &apos;element e of type http://www.w3.org/2001/XMLSchema:anyType&apos;.&quot; /&gt;
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28299</commentid>
    <comment_count>7</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2009-10-13 13:27:14 +0000</bug_when>
    <thetext>Yupp, maybe better now? :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28305</commentid>
    <comment_count>8</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2009-10-13 14:07:46 +0000</bug_when>
    <thetext>Fixed now, thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>