W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2003

Re: List of union

From: Michael Marchegay <mmarcheg@optonline.net>
Date: Tue, 15 Apr 2003 16:29:37 -0400
Message-ID: <003301c3038d$bc27c1a0$8c01a8c0@mendossa>
To: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>
Cc: <xmlschema-dev@w3.org>

"Henry S. Thompson" <ht@cogsci.ed.ac.uk> writes:
> "Michael Marchegay" <mmarcheg@optonline.net> writes:
> > Imagine that you have the following simple type definition:
> >
> > <simpleType name="foo">
> >   <list>
> >     <simpleType>
> >       <union>
> >         <simpleType><list itemType="boolean"/><simpleType>
> >       </union>
> >     </simpleType>
> >   <list>
> > </simpleType>
> >
> > The {base type definition} of foo is the ·simple ur-type definition·;
> > Derivation Valid (Restriction, Simple) is therefore not required;
> Yes it is.  Sorry the name is confusing, we should probably have
> changed it, but the prose at the beginning of 3.14.6 Constraints on
> Simple Type Definition Schema Components reads:
>   "All simple type definitions other than the simple ur-type
>   definition and the built-in primitive datatype definitions (see
>   Simple Type Definitions (3.14)) must satisfy both the following
>   constraints."
> Derivation Valid (Restriction, Simple) is the second constraint, and
> thus applies to _all_ user-defined simple type definitions.

Thank you for the clarification.

A thing that confused me was that in "Derivation Valid (Restriction,
Simple)", it is written:
If the {variety} is union, then  all of the following must be true:
3.1 The {member type definitions} must all have {variety} of atomic or list.

Which means that as this constraint is applied to _all_ the simple types,
union of union are not allowed, and I always thought that they were allowed.

My misunderstanding is probably due to the following sentence in XML Schema
Part 2:
--- Derivation by union
A ·union· datatype can be ·derived· from one or more ·atomic·, ·list· or
other ·union· datatypes, known as the ·memberTypes· of that ·union·
Which seems to say that a union type is allowed among the memberTypes of
another union...

Is my interpretation of "Derivation Valid (Restriction, Simple) correct"?
(i.e. union od union are disallowed)
If so, what is the purpose of the sentence of referenced above?



> So your type definition is, as you hoped, ruled out.
> ht
> --
>   Henry S. Thompson, HCRC Language Technology Group, University of
>                       Half-time member of W3C Team
>      2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
>     Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
>      URL: http://www.ltg.ed.ac.uk/~ht/
>  [mail really from me _always_ has this .sig -- mail without it is forged
Received on Tuesday, 15 April 2003 16:29:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:01 UTC