Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Using XML Schema to Force At Least One Item? >Thread Next - Re: Using XML Schema to Force At Least One Item? Re: Using XML Schema to Force At Least One Item?To: NULL Date: 4/1/2005 7:08:00 PM Kenneth Love wrote: > I'm trying to satisfy a requirement that "at least one of the following > *must* be present" in an XML Schema. I have come up with two examples > that almost work. > > Here's the first: > > <xs:element name="LightExample1" maxOccurs="3"> > <xs:complexType> > <xs:choice> > <xs:element name="A"/> > <xs:element name="B"/> > <xs:element name="C"/> > </xs:choice> > </xs:complexType> > </xs:element> > > This doesn't work because it allows multiple A, B, or C elements. Why do multiple elements conflict with your sole requirement "at least one of the following *must* be present"? -- Martin Honnen http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
