Re: List of union

"Michael Marchegay" <mmarcheg@optonline.net> writes:

> "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:
> ---
> 4.1.2.3 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·
> datatype.
> ---
> 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)

Not at the _XML Representation_ level -- you can name a union in the
memberTypes, but _its_ member types are what get added to the
memberTypes of the resulting component.  So at the _component_ level,
no union of unions.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      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 spam]

Received on Wednesday, 16 April 2003 07:52:14 UTC