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>sdsa d</frequency>
<recurEnd>kjdsk dj</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:complexTy pe mixed="false">
<xs:sequence maxOccurs="unbo unded">
<xs:element ref="frequency"/>
<xs:element ref="endRecur"/>
<xs:any namespace="##ot her" minOccurs="0" maxOccurs="unbo unded"//>
</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>sdsa d</frequency>
<recurEnd>kjdsk dj</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:complexTy pe mixed="false">
<xs:sequence maxOccurs="unbo unded">
<xs:element ref="frequency"/>
<xs:element ref="endRecur"/>
<xs:any namespace="##ot her" minOccurs="0" maxOccurs="unbo unded"//>
</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
Comment