W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2004

"Re: Union types derived by restriction"

From: Kasimier Buchcik <kbuchcik@4commerce.de>
Date: Mon, 20 Sep 2004 12:08:50 +0200
CC: Michael Kay <mhk@mhk.me.uk>, <xmlschema-dev@w3.org>
Message-ID: <414EAC32.7090004@4commerce.de>


on 9/20/2004 11:07 AM Michael Kay wrote:

> In Schema Part 1 (PER 18 Mar 2004), section 3.14.6, Schema Component
> Constraint: Derivation Valid (Restriction, Simple), is the rule:
> The {member type definitions}, in order, must be validly derived
> from the corresponding type definitions in the {base type definition}'s
> {member type definitions} given the empty set, as defined in ...
> However, I'm having trouble seeing how one can define a union as a
> restriction of another union in which the member type definitions differ in
> any way from those of the base type definition. <xs:restriction> only allows
> me to change the pattern and enumeration facets, not the member types.
> For example:
> (a) if the base type is a union of decimal and string, can I make the
> derived type be a union of integer and string? Unless I'm missing something,
> I think not.
> (b) if the base type is a union of dateTime, date, and time, can I make the
> derived type be a union of dateTime and date? Again, I think not.
> So what does rule mean? My suspicion is that it is vacuous.

If you derive a union type from a union type, the "Derivation Valid" 
constraint is not needed, since the derivation process ensures that this 
constraint holds. AFAIK this constraint is needed if you are confronted 
with two type definitions, for which you don't know if one of them has 
been derived from the other, e.g. if using xsi:type [1].



Received on Monday, 20 September 2004 10:08:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:24 UTC