R
Raphael A. Bauer
Hi!
I have the folwing problem with my xml schema. I want the xml file to
look like:
<elementONE>
...
</elementONE>
---OR----
<elementTWO>
...
</elementTWO>
The problem is that I don't know how to formulate this "OR" within the
XML Schema. I think about using something like
<xs:complexType>
<xs:choice>
<xs:element name="elementONE">
...
</xs:element>
<xs:element name="elementTWO">
...
</xs:element>
</xs:choice>
</xs:complexType>
But that doesn't work out because for that I would imho need a
surrounding named element, but I don't want a new surrounding element.
I just want something like
xs:element name="elementONE"|name="elementTWO"
- to say - in fact the elementONE and elementTWO contain the same
content, but they differ only in the name because of "historical" reasons...
Any hints for a frustrated schema (re)maker?
Many thanks in advance,
Raph
I have the folwing problem with my xml schema. I want the xml file to
look like:
<elementONE>
...
</elementONE>
---OR----
<elementTWO>
...
</elementTWO>
The problem is that I don't know how to formulate this "OR" within the
XML Schema. I think about using something like
<xs:complexType>
<xs:choice>
<xs:element name="elementONE">
...
</xs:element>
<xs:element name="elementTWO">
...
</xs:element>
</xs:choice>
</xs:complexType>
But that doesn't work out because for that I would imho need a
surrounding named element, but I don't want a new surrounding element.
I just want something like
xs:element name="elementONE"|name="elementTWO"
- to say - in fact the elementONE and elementTWO contain the same
content, but they differ only in the name because of "historical" reasons...
Any hints for a frustrated schema (re)maker?
Many thanks in advance,
Raph