Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - XML Schema question [Thread Next] RE: XML Schema questionTo: "'Petetsky, Alexander'" <petetsky@-----.--->, <xmlschema-dev@--.---> Date: 3/5/2007 11:46:00 PM With xs:all and three possible elements, it's not too hard to enumerate the possible sequences and spell the whole thing out as a choice of sequences, but it becomes increasingly difficult when the group size gets larger. Really you've got two choices: change the design, or do the validation using a different technology. (You'll never be able to do complete validation against all possible constraints using XML Schema anyway). Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: xmlschema-dev-request@w... > [mailto:xmlschema-dev-request@w...] On Behalf Of Petetsky, Alexander > Sent: 05 March 2007 19:11 > To: xmlschema-dev@w... > Subject: XML Schema question > > > Hi all, > I have a problem I am trying to find a solution/work around for. > One of the elements in my schema by design must consist of > either one child elements or a group of elements with > absolutely no restriction on the order within this group. So, > ideally it would look something like the following (though I > understand it is invalid): > <xs:complexType name="Parent"> > <xs:choice> > <xs:element name="E0" type="xs:int" > minOccurs="1" maxOccurs="unbounded"/> > <xs:all minOccurs="0"> > <xs:element name="E1" type="xs:string" /> > <xs:element name="E2" type="xs:string" /> > <xs:element name="E3" type="xs:string" /> > </xs:all> > </xs:choice> > </xs:complexType> > > Any ideas? > Thanks > --Alex > > > > > > From S.Yona@F... Tue Mar 06 20:36:52 2007 Received: from wiggum.w3.org ([128.30.52. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
