W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2005

[Bug 2156] R-160: Question re: validity of type override with union type

From: <bugzilla@wiggum.w3.org>
Date: Wed, 14 Sep 2005 15:12:37 +0000
To: www-xml-schema-comments@w3.org
Message-Id: <E1EFYw9-00084f-MD@wiggum.w3.org>


           Summary: R-160: Question re: validity of type override with union
           Product: XML Schema
           Version: 1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSD Part 2: Datatypes
        AssignedTo: cmsmcq@w3.org
        ReportedBy: sandygao@ca.ibm.com
         QAContact: www-xml-schema-comments@w3.org

I am unable to determine the intent and meaning of section 3.14.6 Constraints 
on Simple Type Definition Schema Components. 

My recall is that the intent of instance type overides is ONLY to apply 
stricter constraints on the data to be validated. Yet, when working an example, 
the use in extensibility deriving alternative types became apparent. 

Read one way:

- unitedColor is validly derived by union from rgbColor and the instance is 
valid. If So, the text in parenthesis is not normative and confusing. 

Or another way

- unitedColor is NOT validly derived from rgbColor because it is not derived by 
restriction and therefore the instance is not valid. If so, why is union in the 


My guess: the first two test-colors are valid, the last three are not. xsi:type 
can be a built-in type or a globally defined type in the schema but must be a 
type that is derived from the original type of the element or attribute. 

I think the ruling clause is:
- 2.2.4 does not apply because B (rgbColor) is not an union. 
- 2.2.2 D's base type definition is not the simple ur-type definition and is 
validly derived from B given the subset, as defined by this constraint. 
where in this case, B (rgbColor) is restriction of unsignedByte 

when D = unitedColor - The fact that a union exists should have no impact, the 
union is in D's variety and the text in the first para says "of which only 
restriction is actually relevant" 

Yet, the only reason to believe that it is not validly derived is the clause 
2.2.2. This logic becomes circular. 

See the following for more info and examples:
Received on Wednesday, 14 September 2005 15:12:46 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:04 UTC