I’m stuck on how to create and XSD that allows children of an ‘objects’ node be either ‘text’ or ‘image’ nodes any show up any number of times and in any order. The order in which they appear within the ‘objects’ node determines how they are rendered but the order does not need to be validated.
Example 1
<objects>
<textobject x="30" y="100" value="blah1" />
<imageobject x="0" y="0" src="/path/to/some/image1.png"/>
<imageobject x="0" y="0" src="/path/to/some/image2.png"/>
<textobject x="60" y="250" value="blah2" />
<textobject x="60" y="250" value="blah3" />
</objects>
Example 2
<objects>
<imageobject x="0" y="0" src="/path/to/some/image1.png"/>
<textobject x="30" y="100" value="blah1" />
<textobject x="60" y="250" value="blah2" />
<imageobject x="0" y="0" src="/path/to/some/image2.png"/>
<textobject x="60" y="250" value="blah3" />
</objects>
thanks!
You could use
xs:choicewithminOccurs="0"andmaxOccurs="unbounded":