Re: Rationale for restricted uses of "all"

"Gary Robertson" <gazinyork@hotmail.com> writes:

> Hi Henry
> 
> > <snip/>
> >
> > > What is really needed is for it to be legal to write something like:
> > >
> > > <xs:all>
> > >   <A minoccurs=0 maxoccurs=unbounded>
> > >   <B minoccurs=1 maxoccurs=unbounded>
> > >   <C minoccurs=2 maxoccurs=5>
> > > </xs:all>
> > >
> > > Although xs:nosequence might be more descriptive than xs:all.
> >
> > _One_ (not the only) reason in the way of doing this is that the WG
> > has found that although some people ahve said something like the above
> > is what they want, they turn out to mean different things by it.
> >
> > On _your_ interpretation of the above, would the following be valid:
> >
> > <C/><B/><C/>
> >
> > ?
> >
> > ht
> 
> Yes, my _requirement_ is that the elements are able to occur in any order.
> Only the number of incidences of each is significant (the cases of
> min=0, max=unbounded and min=1, max=unbounded are the ones my
> application requires in reality).

That's actually an important observation -- it's in part the
interaction with numeric maxOccurs and >1 minOccurs that cause
implementation difficulties.

> I must be being thick again because I can't see any ambiguity in the
> above. Could you explain please?

The stricter interpretation is that the same-named elements must occur 
adjacent to one another, so the above would be invalid, but e.g.
 
 <C/><C/><B/>
or
 <B/><C/><C/>

would be OK.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-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/

Received on Wednesday, 21 November 2001 06:44:42 UTC