<?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>4065</bug_id>
          
          <creation_ts>2006-12-10 14:53:27 +0000</creation_ts>
          <short_desc>stZ073b - deriving from a restricted union</short_desc>
          <delta_ts>2010-04-05 16:28:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema Test Suite</product>
          <component>Microsoft tests</component>
          <version>2006-11-06</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>waiting for dependency resolution</status_whiteboard>
          <keywords>disputedSpec</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>5784</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Henry S. Thompson">ht</assigned_to>
          <cc>David_E3</cc>
          
          <qa_contact name="XML Schema Test Suite mailing list">public-xml-schema-testsuite</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>13126</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-12-10 14:53:27 +0000</bug_when>
    <thetext>In the Microsoft SimpleType test set, test group stZ073b, the schema defines a type

 &lt;xs:simpleType name=&quot;st.unionType&quot;&gt;
  &lt;xs:restriction&gt;
   &lt;xs:simpleType&gt;
    &lt;xs:union memberTypes=&quot;xs:string xs:integer&quot;/&gt;
   &lt;/xs:simpleType&gt;
   &lt;xs:enumeration value=&quot;a&quot;/&gt;
  &lt;/xs:restriction&gt;
 &lt;/xs:simpleType&gt;

Intuitively, the value &quot;11&quot; cannot appear as an instance of this type, and the test is therefore correct to reject it. However, the test actually has 

&lt;test xsi:type=&quot;xs:integer&quot;&gt;
   11
&lt;/test&gt;

Now in Type Derivation OK (Simple), rule 2.2.4 appears to say that xsi:type=&quot;xs:integer&quot; is validly derived from st:unionType, because &quot;B&apos;s {variety} is union and D is validly derived from a type definition in B&apos;s {member type definitions}.&quot; If this is the case, then the value 11 is validated against xs:integer and succeeds.

This seems to be an error in the specification. Rule 2.2.4 should perhaps say  &quot;B&apos;s {variety} is union and B&apos;s {base type definition} is anySimpleType and D is validly derived from a type definition in B&apos;s {member type definitions}.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13841</commentid>
    <comment_count>1</comment_count>
    <who name="Zafar Abbas">zafara</who>
    <bug_when>2007-01-29 22:47:17 +0000</bug_when>
    <thetext>WG needs to clarify on what the behavior should be here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20731</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-06-22 15:04:00 +0000</bug_when>
    <thetext>Agreed, this is a known bug in the 1.0 spec, and the instance ought to be invalid: the question is whether it is possible to fix it without an excessive amount of disruption.

As an alternative to the fix suggested in the bug, one could say that a member of a union is not validly derived from the union if the union has any facets. This is probably equivalent except in the case of a trivial restriction.

Leaving this one as open, dependent on bug #5784 which has been raised against the 1.0 spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32707</commentid>
    <comment_count>3</comment_count>
    <who name="David Ezell">David_E3</who>
    <bug_when>2010-02-26 16:32:38 +0000</bug_when>
    <thetext>WG decided

copy the test stz073B and mark the copy stable and 1.1 only.
(Action to HT).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34555</commentid>
    <comment_count>4</comment_count>
    <who name="Henry S. Thompson">ht</who>
    <bug_when>2010-04-05 16:28:07 +0000</bug_when>
    <thetext>Copied to a 1.1-only stable test stZ073b, marked this as 1.0 only, left 
instance-test as disputed-spec but schema-test as stable</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>