C
cr
Could somebody tell me whether the use of duplicate element definition
or reference are permitted in XML schemas?
For example:
<complexType name="PurchaseOrderType">
<sequence>
<element name="shipTo" type="string"/>
<element name="shipTo" type="string"/>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<element name="billTo" type="ipo:Address"/>
<element ref="ipo:comment" minOccurs="0"/>
<element ref="ipo:comment" minOccurs="2"/>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<element name="Items" type="ipo:Items"/>
</sequence>
<attribute name="orderDate" type="date"/>
</complexType>
In XMLSpy 5.0 this schema fragment can pass the validation.
The element "shipTo" is duplicate defined, why it can pass the
validation.
And how can I distinguish the element "ipo:comment" in xml instance?
or reference are permitted in XML schemas?
For example:
<complexType name="PurchaseOrderType">
<sequence>
<element name="shipTo" type="string"/>
<element name="shipTo" type="string"/>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<element name="billTo" type="ipo:Address"/>
<element ref="ipo:comment" minOccurs="0"/>
<element ref="ipo:comment" minOccurs="2"/>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<element name="Items" type="ipo:Items"/>
</sequence>
<attribute name="orderDate" type="date"/>
</complexType>
In XMLSpy 5.0 this schema fragment can pass the validation.
The element "shipTo" is duplicate defined, why it can pass the
validation.
And how can I distinguish the element "ipo:comment" in xml instance?