Re: List of union

"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)
If so, what is the purpose of the sentence of 4.1.2.3 referenced above?

Thanks,

Michael

> So your type definition is, as you hoped, ruled out.
>
> 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 Tuesday, 15 April 2003 16:29:58 UTC