Subject:Help in creating XSD Author:Suresh Uppala Date:19 May 2010 11:24 AM
Hi, I need small help in creating one XSD,
Here is my XML
<Context>
<ContextId>ABC</ContextId>
<RegCode>111</RegCode>
</Context>
or
<Context>
<ContextId>CDE</ContextId>
<FMID>111</FMID>
</Context>
but in the above XSD we can have combination like below
<Context>
<ContextId>ABC</ContextId>
<FMID>111</FMID>
</Context> we should want not this combination , how can I restrict this in XSD
if ContextId Data is ABC then I need to have only RegCode element
if ContextId Data is CDE then I need to have only FMID