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

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2156

           Summary: R-160: Question re: validity of type override with union
                    type
           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 
list? 

Analysis: 

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:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2002AprJun/0152.html

Received on Wednesday, 14 September 2005 15:12:46 UTC