<?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>4026</bug_id>
          
          <creation_ts>2006-11-29 16:15:50 +0000</creation_ts>
          <short_desc>validateexpr-24</short_desc>
          <delta_ts>2006-11-30 06:58:21 +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>1.0.2</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>INVALID</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="Andrew Eisenberg">andrew.eisenberg</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>13044</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2006-11-29 16:15:50 +0000</bug_when>
    <thetext>This test makes tests validation using the schema:

  &lt;xs:simpleType name=&quot;unionType&quot;&gt;
    &lt;xs:union memberTypes=&quot;xs:integer xs:float&quot;/&gt;
  &lt;/xs:simpleType&gt;

  &lt;xs:simpleType name=&quot;listType&quot;&gt;
    &lt;xs:list itemType=&quot;lu:unionType&quot;/&gt;
  &lt;/xs:simpleType&gt;

  &lt;xs:element name=&quot;e&quot; type=&quot;lu:listType&quot;/&gt;

The test validates:

&lt;lu:e&gt;1 1.0e0&lt;/lu:e&gt;

and checks that the first item is a instance of xs:integer, and the second is an instance of xs:float.

Howevre, since the lexical space of xs:float is a superset of xs:integer, is a validator not permitted to determine that both of these are instances of xs:float?

I can&apos;t find anything in the specs (XQuery or XML Schema) which specifies the order in which a lexical representation is tested against the member types of a union.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13045</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-11-29 17:08:33 +0000</bug_when>
    <thetext>XML Schema Part 2 section 2.5.1.3

The order in which the ·memberTypes· are specified in the definition (that is, the order of the &lt;simpleType&gt; children of the &lt;union&gt; element, or the order of the QNames in the memberTypes attribute) is significant. During validation, an element or attribute&apos;s value is validated against the ·memberTypes· in the order in which they appear in the definition until a match is found. The evaluation order can be overridden with the use of xsi:type.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13046</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2006-11-30 06:57:28 +0000</bug_when>
    <thetext>Thanks.  I spent all day looking in Part 1.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>