D
Damiano ALBANI
Hello,
I'd like to write a single XML Schema for both these documents :
<Items>
<Item xml:id="id1">
<Name>ABC</Name>
...
</Item>
<Item xml:id="id2">
<Name>DEF</Name>
...
</Item>
...
</Items>
and
<Items>
<Item ref="id1"/>
<Item ref="id2"/>
...
</Items>
That looks "easy", but I've been googling for hours and tried so many
differents combinations of <choice> and <sequence>'s... and yet it
doesn't work :/
All I got at best were errors saying "local complex type: The content
model is not determinist" -- because the element name "Item" is used in
both "types" of elements IIUC.
Maybe using more complex OO features of XML Schema would somehow help me
out?
Cheers,
I'd like to write a single XML Schema for both these documents :
<Items>
<Item xml:id="id1">
<Name>ABC</Name>
...
</Item>
<Item xml:id="id2">
<Name>DEF</Name>
...
</Item>
...
</Items>
and
<Items>
<Item ref="id1"/>
<Item ref="id2"/>
...
</Items>
That looks "easy", but I've been googling for hours and tried so many
differents combinations of <choice> and <sequence>'s... and yet it
doesn't work :/
All I got at best were errors saying "local complex type: The content
model is not determinist" -- because the element name "Item" is used in
both "types" of elements IIUC.
Maybe using more complex OO features of XML Schema would somehow help me
out?
Cheers,