Hi,
I have a complex type element which can take three possible child elements, of which one is a must and only one of the other two can appear. I am not sure how to apply the restriction.
Specifically, the fundSrc_ID element must appear but either org_id or OtherGranteeOrg should appear but not both.
How to prevent org_id and OtherGranteeOrg from both appearing?
Any idea/help is appreciated.
John
---------------------------------------------------------
Sample XML Schema element:
Code:
<xs:element name="rec" maxOccurs="unbounded">
<xs:complexType>
<xs:all>
<xs:element name="fundSrc_ID" type="FundSrc_ID_Type"/>
<xs:element name="org_ID" type="Org_ID_Type" minOccurs="0"/>
<xs:element name="OtherGranteeOrg" type="xs:string" minOccurs="0"/>
</xs:all>
<xs:attribute name="CADR_ID" type="CADRIDType" use="required"/>
</xs:complexType>
</xs:element>