Hi,
I'm trying to learn xml schema. Is the code below mean element billOfLading can contain either element masterBill or houseBill but not both? How can I modify it so that it can contain either masterBill or houseBill or both.
And at lease one of them (masterBill or houseBill) must be present in billOfLading.
Thank in advance
I'm trying to learn xml schema. Is the code below mean element billOfLading can contain either element masterBill or houseBill but not both? How can I modify it so that it can contain either masterBill or houseBill or both.
And at lease one of them (masterBill or houseBill) must be present in billOfLading.
Thank in advance
Code:
<xs:complexType name="data">
<xs:sequence>
<xs:element name="actionCode" type="xs:string">
<xs:element name="billOfLading" type="bl" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="bl">
<xs:sequence>
<xs:choice>
<xs:element name="masterBill" type="mbl"/>
<xs:element name="houseBill" type="hbl"/>
</xs:choice>
</xs:sequence>
</xs:complexType>