[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Schema for unordered elements, with additional requirements
- From: "Robert Hall" <rhall@tivo.com>
- To: <xml-dev@lists.xml.org>
- Date: Fri, 29 Feb 2008 10:51:47 -0800
Here's what I'd like to do, but <xs:all> does not allow
maxOccurs="unbounded" and it doesn't accept <xs:any> elements.
<xs:element name="root">
<xs:complexType>
<xs:all>
<xs:element name="foo" />
<xs:element name="bar" />
<xs:element name="zzz" maxOccurs="unbounded" />
<xs:any namespace="##other"
processContents="skip" maxOccurs="unbounded" />
</xs:all>
</xs:complexType>
</xs:element>
Here are the requirements:
1. Elements can appear in any order.
2. Elements foo, bar, and zzz are required.
3. Element zzz can appear more than once.
4. Elements from other namespaces are allowed but ignored.
I have tried various combinations of <xs:sequence> and <xs:choice> and
<xs:group> elements with various minOccurs and maxOccurs values, but
haven't been able to meet all the requirements.
Is it possible with XML Schema?
Thanks,
-rh
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]