OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Schema for unordered elements, with additional requirements

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:element name="foo" />
			<xs:element name="bar" />
			<xs:element name="zzz" maxOccurs="unbounded" />
			<xs:any namespace="##other"
processContents="skip" maxOccurs="unbounded" />

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?


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS