W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2001

Re: ASN.1 => XML Schema questions

From: Martin Duerst <duerst@w3.org>
Date: Wed, 27 Jun 2001 15:29:11 +0900
Message-Id: <>
To: Geoff Elgey <elgey@dstc.qut.edu.au>
Cc: xmlschema-dev@w3.org
At 15:46 01/06/27 +1000, Geoff Elgey wrote:

>I've already found this ambiguity, and I guess that shoots down any
>reason I have for using <all> with maxOccurs > 1.

Well, the problem isn't with a particular syntactic construct,
such as <all>, but with the idea that you want to have a
sequence of sets. If the sets have common elements (true in
your case, because the sets are always subsets of the same
base set), and if elements can be missing (true for anything
the merrits the name 'set'), then you get these ambiguities
in any case.

I'm very curious how ASN.1 solves this problem.

> > > > > So your options are either
> > > > >
> > > > > - stick to W3C XML Schema and make a compromise by using (a|b)* 
> rather
> > > > >   than (ab|ba)*.
> >
> > I'm confused. Is (ab|ba)* really what what was needed?
> > This is completely deterministic, as far as I understand.
> > It therefore should be allowed in DTDs, and if it doesn't
> > work in Schemas, that would be a big problem.
><all> with elements 'a' and 'b' is represented as (ab|ba) -- that is, a
><choice> of every permutation of the elements.

For two elements, obviously, you can just write (ab|ba), so you don't
need <all> with its special restrictions. For more elements, this
approach gets very tedious.

>The problem with <all>* is that ambiguities creep in if the number of
>elements is > 1 and any of the elements can have a minOccurs of 0  --
>this is demonstrated by the example above.

Yes. But as I said, the problem is NOT with <all>*.
The problem is with Sequence of Sets. Having a Sequence of Sets
but not knowing exactly what belongs to which set seems somewhat
pointless to me, but maybe that's what ASN.1 does?

Regards,  Martin.
Received on Wednesday, 27 June 2001 02:29:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:52 UTC