This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2156 - R-160: Question re: validity of type override with union type
Summary: R-160: Question re: validity of type override with union type
Status: CLOSED WORKSFORME
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Datatypes: XSD Part 2 (show other bugs)
Version: 1.0 only
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-14 15:12 UTC by Sandy Gao
Modified: 2009-04-21 19:25 UTC (History)
0 users

See Also:


Attachments

Description Sandy Gao 2005-09-14 15:12:37 UTC
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
Comment 1 Sandy Gao 2005-09-14 15:14:23 UTC
Discussed at the Sept. 19 conference call. 

RESOLVED: to class R-160 as clarification without erratum (i.e. no change is 
required). PVB to draft reply to commentator on R-160.