Hi,
I've always understood XMLSchemas and DTDs to be equivalent but that the latter is more cumbersome to use when modeling complex relationships (like inheritance).
Recently I wanted to build a schema to validate documents that have a structure like this:
<data>
<array>
<int></int>
<int></int>
</array>
</array>
<float></float>
<float></float>
</array>
<int><int>
<float></float>
</data>
The elements inside < data > can appear in any order and each is of cardinality 0..* Using XMLSchema, if I define a complex type using < xs:all > I can have the elements out of order but the maximum cardinality is 1. < xs:sequence > and < xs:choice > are the other obvious candidates but they're more restrictive than what I want.
Then I noticed that a DTD seems to be able to achieve this like so:
<!ELEMENT data (array | float | int)*>
Is there any way to build an equivalent schema or do I have to use DTDs here?