XSD: Check if one of two mandatory elements is empty



I have the following XML structure:



<X>
<Y>
<A></A>
<B>content</B>
<C>othercontent</C>
</Y>
</X>


in my XSD I whould like to validate if one of the elements xor is empty. The file is valid if just one of the elements is filled and the other one is empty. Both elements are mandatory in the XML.


No comments:

Post a Comment