logo       

Related Msgs: audio.musicbrai...    enbd.general/20...    ietf.idr/2002-0...    java.ant-contri...    gnu.make.genera...    qplus.devel/200...    video.freevo.cv...    os.netbsd.ports...    yellowdog.gener...    xfree86.cvs/200...    search.nutch.us...    freedesktop.xse...    programming.swi...    capabilities.ge...    telephony.pbx.a...    mail.sylpheed.c...    db.firebase.por...    boot-loaders.u-...    recreation.radi...    netbsd.bugs/200...    web.zope.plone....    user-groups.lin...   

Re: Issue with choice of group elements:: msg#00113

Subject: Re: Issue with choice of group elements:
Sorry, that was my mistake :)

----- Original Message ----- 
From: "Robert Houben" <Robert.Houben@xxxxxxxxxxxxxx>
To: <xerces-j-user@xxxxxxxxxxxxxx>
Sent: Friday, April 30, 2004 12:15 AM
Subject: RE: Issue with choice of group elements:


> Do you really want maxOccurs 0 and minOccurs 100 or 1000 on cat and dog?
> I think you wanted those reversed...
> 
> -----Original Message-----
> From: Robert Dare [mailto:dare@xxxxxxxxxx] 
> Sent: Thursday, April 29, 2004 2:38 PM
> To: xerces-j-user@xxxxxxxxxxxxxx
> Subject: Re: Issue with choice of group elements:
> 
> 
> Thanks!!
> 
> This works fine when I have Cat, Dog, Dog, Dog,
> but if I have Cat, Cat, Cat, Dog it fails.  I suppose
> this is because when parsing, it would have to look
> like Cat, Dog, Cat, Cat, Cat ...
> 
> I will keep working on this.
> 
> Thanks for your help!
> 
> 
> >
> > From: "Robert Dare" <dare@xxxxxxxxxx>
> >> I would expect from this schema that <animals> would be
> >> allowed to have 1 cat and 1 dog.  If it has more than one
> >> dog, there should be only 1 cat and vice-versa.
> >>
> >> When I generate XML with 1 can and multiple DOGs, Xerces
> >> gives me the following error:
> >>
> >> Error on line 15: cvc-complex-type.2.4.d: Invalid content was found
> >> starting with element 'DOG'. No child element is expected at this
> point.
> >
> > You always seem to have one dog and one cat,
> > and perhaps more dogs or cats, but not both
> >
> > How about this schema idea (not tested)....
> >
> > <xs:element name="Animals">
> >   <xs:complextType>
> >     <xs:sequence>
> >       <xs:element ref="dog" maxOccurs="1" minOccurs="1" />
> >       <xs:element ref="cat" maxOccurs="1" minOccurs="1" />
> >       <xs:choice>
> >         <xs:group ref="Cats" />
> >         <xs:group ref="Dogs" />
> >      </xs:choice>
> >     </xs:sequence>
> >   </xs:complexType>
> > </xs:element>
> >
> > <xs:group name="Cats">
> >   <xs:sequence>
> >     <xs:element ref="cat" maxOccurs="0" minOccurs="100" />
> >   </xs:sequence>
> > </xs:group>
> >
> > <xs:group name="Dogs">
> >   <xs:sequence>
> >     <xs:element ref="dog" maxOccurs="0" minOccurs="1000" />
> >   </xs:sequence>
> > </xs:group>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-user-unsubscribe@xxxxxxxxxxxxxx
> > For additional commands, e-mail: xerces-j-user-help@xxxxxxxxxxxxxx
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xxxxxxxxxxxxxx
> For additional commands, e-mail: xerces-j-user-help@xxxxxxxxxxxxxx
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xxxxxxxxxxxxxx
> For additional commands, e-mail: xerces-j-user-help@xxxxxxxxxxxxxx
> 
> 
> 



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo