I\'ve been trying out the following. I want to create an XSD for an XML where certain elements are allowed to appear only once and need to be valid, and elements from other
In XSD 1.1 you can do this very easily by defining an open content model:
<xs:complexType ...>
<xs:openContent mode="interleave">
<xs:any namespace=.../>
</xs:openContent>
... regular content model ...
</xs:complexType>
There's no easy way to do it in 1.0; you just have to put an optional wildcard in every possible position.