I have the below XML.
<?xml version="1.0" encoding="utf-8" ?>
<Items>
<Item type="none" attNone1="test" attNone2="test3" />
<Item type="action" attAction1="test" attAction2="test2" />
</Items>
I need to create an XSD based on some rules:
1) the attribute "type" is required.
2) If the attribute value should be "none" or "action"
3) If the attribute value is "none" I should have two other required attribute, "attNone1" and "attNone2". I should not accept "attAction1" or "attAction2"
4) If the attribute value is "action" I should have two other required attribute, "attAction1" and "attAction2". I should not accept "attNone1" or "attNone2"
Any idea how to do this XSD?
Thanks in advance,
Regards,