<?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>2191</bug_id>
          
          <creation_ts>2005-09-14 18:54:20 +0000</creation_ts>
          <short_desc>R-198: Problem with unions of unions</short_desc>
          <delta_ts>2009-04-21 19:25: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</product>
          <component>Datatypes: XSD Part 2</component>
          <version>1.0 only</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>LATER</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="Sandy Gao">sandygao</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          
          
          <qa_contact name="XML Schema comments list">www-xml-schema-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6203</commentid>
    <comment_count>0</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2005-09-14 18:54:20 +0000</bug_when>
    <thetext>The Union SimpleType Definition Schema Component is defined with the followg 
properties: 

{member type definitions} 

The appropriate case among the following: 
1 If the &lt;union&gt; alternative is chosen, then [Definition:]define the explicit 
members as the type definitions resolved to by the items in the actual value of 
the memberTypes [attribute], if any, followed by the type definitions 
corresponding to the &lt;simpleType&gt;s among the [children] of &lt;union&gt; if any. The 
actual value is then formed by replacing any union type definition in the 
explicit members with the members of their {member type definitions}, in order. 

2 If the &lt;restriction&gt; option is chosen, then the {member type definitions} of 
the {base type definition}. 

{facets} 

If the &lt;restriction&gt; alternative is chosen, a set of facet components 
constituting a restriction of the {facets} of the {base type definition} with 
respect to a set of facet components corresponding to the appropriate element 
information items among the [children] of &lt;restriction&gt; (i.e. those which 
specify facets, if any), as defined in Simple Type Restriction (Facets) 
(3.14.3), otherwise the empty set.

I believe that it implies a loss of facet restrictions which is highlighted by 
the following example: 

&lt;xsd:schema targetNamespace=&quot;http:///simple/MySchema.xsd&quot;
    xmlns:this=&quot;http:///simple/MySchema.xsd&quot; 
xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
    &lt;xsd:simpleType name=&quot;mySimpleType1&quot;&gt;
        &lt;xsd:union memberTypes=&quot;xsd:nonNegativeInteger xsd:boolean&quot;/&gt;
    &lt;xsd:simpleType&gt;
    &lt;xsd:simpleType name=&quot;mySimpleType2&quot;&gt;
        &lt;xsd:restriction base=&quot;this:mySimpleType1&quot;&gt;
            &lt;xsd:enumeration value=&quot;true&quot;/&gt;
            &lt;xsd:enumeration value=&quot;0&quot;/&gt;
        &lt;xsd:restriction&gt;
    &lt;xsd:simpleType&gt;
    &lt;xsd:simpleType name=&quot;mySimpleType3&quot;&gt;
        &lt;xsd:union memberTypes=&quot;xsd:negativeInteger this:mySimpleType2&quot;/&gt;
    &lt;xsd:simpleType&gt;
    &lt;xsd:simpleType name=&quot;mySimpleType4&quot;&gt;
        &lt;xsd:restriction base=&quot;this:mySimpleType3&quot;&gt;
            &lt;xsd:enumeration value=&quot;-1&quot;/&gt;
            &lt;xsd:enumeration value=&quot;0&quot;/&gt;
            &lt;xsd:enumeration value=&quot;1&quot;/&gt;
            &lt;xsd:enumeration value=&quot;true&quot;/&gt;
            &lt;xsd:enumeration value=&quot;false&quot;/&gt;
        &lt;xsd:restriction&gt;
    &lt;xsd:simpleType&gt;
&lt;xsd:schema&gt;

Since the literal value &quot;1&quot; and the literal value &quot;false&quot; are not in the value 
space of mySimpleType2 nor in the value space of negativeInteger, they would 
appear to be in error. But a literal interpretation of the definition would 
imply that mySimpleType3 is just a union of negativeInteger, 
nonNegativeInteger, and boolean and hence &quot;1&quot; and &quot;false&quot; are valid literals. 

Isn&apos;t this quiet loss of explicit facet restrictions a problem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6204</commentid>
    <comment_count>1</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2005-09-14 18:59:27 +0000</bug_when>
    <thetext>Discussed at the April 10,2003 telecon. No decision reached. 

ACTION: Paul Biron to work this out in painful detail.

Resolution:
At the June 12 2003 telecon: RESOLVED: Class R-198 as error to be fixed in 1.1.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>