There is a xml structure as follows
Is it possible in XSD to block "dataRef" element referencing it's parent "data/dataRef" attribute value (basically a child can't match parents value constraint). Is it possible to make two way relationships mandatory as seen in the "order/item" of "AAAA" which has a reference to "AEAR" "data" element but that element does not have a "AAAA" data item referencing "data" "AAAA"
<data dataRef="AAAA">
<order>
<!-- this should not be allowed to reference its own parent element -->
<item>
<dataRef>AAAA</dataRef>
</item>
<item>
<dataRef>BASA</dataRef>
</item>
<item>
<dataRef>AEAR</dataRef>
</item>
</order>
</data>
<data dataRef="AEAR">
<order>
<!-- since this is referenced from data/@dataRef="AAAA" there should be an element pointing back to "dataRef" "AAAA" as it is a two way relationship -->
<item>
<dataRef>BASA</dataRef>
</item>
</order>
</data>