K
klikic
Hi.
How can create a unordered sequence with defined elements that can
occur ones and "other" elements that are ignored.
Example:
XML:
<Recur>
<ignoredElement>saasda</ignoredElement>
<frequency>sdsad</frequency>
<recurEnd>kjdskdj</recurEnd>
</Recur>
Elements "frequency" and "recurEnd" are not optional and can occur only
ones. Element "ignoredElement" or any other element taht is not
defined, can occur multiple times or none, and can be at any position
(between mandatory elements or at end,...).
I created XSD:
<xs:element name="Recur">
<xs:complexType mixed="false">
<xs:sequence maxOccurs="unbounded">
<xs:element ref="frequency"/>
<xs:element ref="endRecur"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"//>
</xs:sequence>
</xs:complexType>
</xs:element>
This doesn't work: I have errors while validating XML with XSD.
I tried with choice but with same effect.
Any help or suggestion would be nice.
Thanks.
Alan
How can create a unordered sequence with defined elements that can
occur ones and "other" elements that are ignored.
Example:
XML:
<Recur>
<ignoredElement>saasda</ignoredElement>
<frequency>sdsad</frequency>
<recurEnd>kjdskdj</recurEnd>
</Recur>
Elements "frequency" and "recurEnd" are not optional and can occur only
ones. Element "ignoredElement" or any other element taht is not
defined, can occur multiple times or none, and can be at any position
(between mandatory elements or at end,...).
I created XSD:
<xs:element name="Recur">
<xs:complexType mixed="false">
<xs:sequence maxOccurs="unbounded">
<xs:element ref="frequency"/>
<xs:element ref="endRecur"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"//>
</xs:sequence>
</xs:complexType>
</xs:element>
This doesn't work: I have errors while validating XML with XSD.
I tried with choice but with same effect.
Any help or suggestion would be nice.
Thanks.
Alan