P
Pete
Hi,
I want to be able to represent the following xml in a schema
<Data>
<a/>
<b/>
<c subtype='one value'/>
<c subtype='another value'/>
<d/>
etc.
</Data>
Further constraints are (a) in real world, elements may appear in any
order (which appears to constrain me from using sequence), (b) although
several elements are optional, I cannot guarantee that only one element
will be present at any one time (which appears to constrain me from
using choice).
My gut feel is that I should be using <xs:all>, but in an <xs:all>
maxoccurs may not be greatee than one. So, when I throw a document at a
schema, the second occurrence of element c makes the document invalid.
Am I missing something? This seems like an obvious question, but....
I would be happy to approach this differently if anyone has any ideas -
the constraints are as above, and I really do want to run the data file
through a schema before I waste any time processing it.
TIA,
Pete
I want to be able to represent the following xml in a schema
<Data>
<a/>
<b/>
<c subtype='one value'/>
<c subtype='another value'/>
<d/>
etc.
</Data>
Further constraints are (a) in real world, elements may appear in any
order (which appears to constrain me from using sequence), (b) although
several elements are optional, I cannot guarantee that only one element
will be present at any one time (which appears to constrain me from
using choice).
My gut feel is that I should be using <xs:all>, but in an <xs:all>
maxoccurs may not be greatee than one. So, when I throw a document at a
schema, the second occurrence of element c makes the document invalid.
Am I missing something? This seems like an obvious question, but....
I would be happy to approach this differently if anyone has any ideas -
the constraints are as above, and I really do want to run the data file
through a schema before I waste any time processing it.
TIA,
Pete