- From: Age Bosma <agebosma@gmail.com>
- Date: Wed, 22 Oct 2008 21:51:20 +0200
- To: xmlschema-dev@w3.org
Hi, I can't seem to find a solution for the following problem. I hope you can help me out. Here's a stripped down version of what I've got: <xsd:complexType name="rootType"> <xsd:sequence> <xsd:element name="platform" type="platformType" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="device" type="deviceType" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> Basically, as you can see, the parent element can have zero or more platform elements AND zero or more device elements. I'd like to add an additional requirement. The parent element should at least have one of the two child (platform OR device) elements. How can this be expressed in XML Schema? Can it be done at all? Using 'choice' doesn't seem like an option to me since that would only allow me to include one of the two and not both. Thank in advance, Age Bosma
Received on Wednesday, 22 October 2008 21:38:53 UTC