W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2002

Thanks everybody! and a minor question about steve's revised implementation Re: how does one represent an alternating set of elements?

From: John Utz <utz@singingfish.com>
Date: Mon, 18 Feb 2002 12:22:34 -0800 (PST)
To: Steve Baker <sjb@sphinx.mythic-beasts.com>, Martin Gudgin <marting@develop.com>, jeni@jenitennison.com, gkholman@CraneSoftwrights.com
cc: xmlschema-dev@w3.org
Message-ID: <Pine.LNX.4.21.0202181208340.3308-100000@mail.singingfish.com>
Steve, does the message that you wrote about the previous version that you
created apply? ie replace 'all' with 'sequence'?

bash-2.04$ java dom.ASBuilder -f -a Alt4.xsd -i Alt4.xml 
[Error] :-1:-1: Error:  cos-all-limited.1.2: A group whose content is
"all" must only appear as the content type of a complex type
definition.  Saw group in "sequence".

replacing the all with sequence, makes this error go away, but then i get
the UPA violation.

bash-2.04$ java dom.ASBuilder -f -a Alt4.xsd -i Alt4.xml 
[Error] :-1:-1: cos-nonambig: ("":A) and ("":A){0-1} (or elements from
their substitution group) violate "Unique Particle Attribution".
bash-2.04$ 

sigh. this seems like it shouldnt be that hard to describe. but given the
other mail that has been sent on this issue over the weekend, it seems
like this is just one of those things....

i perused all the good stuff that JT has sent out in an earlier
email. that's pretty convincing collection of facts.

i will send this all onto the MPEG7 people and let them digest it.

thankyou all for your help

On Mon, 18 Feb 2002, Martin Gudgin wrote:

> XSV may pass it, but it's not legal. all groups cannot be nested inside
> sequence or choice groups, they must always appear at the top-level of a
> content model.
> 
> Sounds like a bug in XSV to me...
> 
> Gudge
> 
> ----- Original Message -----
> From: "Steve Baker" <sjb@sphinx.mythic-beasts.com>
> To: "John Utz" <utz@singingfish.com>
> Cc: <xmlschema-dev@w3.org>
> Sent: Saturday, February 16, 2002 3:30 PM
> Subject: Re: how does one represent an alternating set of elements?
> 
> 
> > Dear John
> >
> > This schema represents the structure you require and passes XSV:
> >
> > <?xml version = "1.0" encoding = "UTF-8"?>
> > <xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema">
> >
> >   <xsd:element name='A' type='xsd:anyType'/>
> >   <xsd:element name='B' type='xsd:anyType'/>
> >
> >   <xsd:element name='seqAB'>
> >     <xsd:complexType>
> >       <xsd:sequence>
> >         <xsd:group ref='seqABgroup' minOccurs='0' maxOccurs='unbounded'/>
> >         <xsd:element ref='A' minOccurs='0'/>
> >       </xsd:sequence>
> >     </xsd:complexType>
> >   </xsd:element>
> >
> >   <xsd:group name='seqABgroup'>
> >     <xsd:all>
> >         <xsd:element ref='A'/>
> >         <xsd:element ref='B'/>
> >     </xsd:all>
> >   </xsd:group>
> >
> > </xsd:schema>
> >
> > HTH
> >
> > regards
> >
> > Steve Baker
> >
> > On Fri, 15 Feb 2002, John Utz wrote:
> >
> > > greetings;
> > >
> > > i hope this is trivial for somebody, it's been an absolute hair puller
> for
> > > me and some other people.
> > >
> > > i am attempting to describe a set of alternating elements:
> > >
> > > so, the valid collections of elements would be
> > >
> > > A, AB, ABA, ABAB,....
> > >
> > > what would *not* be legal would be:
> > >
> > > B, BA, AA, ABB, ABAA, BB,....
> > >
> > > any help in describing this would be greatly appreciated!
> > >
> > > tnx!
> > >
> > > johnu
> > >
> > >
> >
> >
> 
> 
Received on Monday, 18 February 2002 15:23:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:26 GMT