I have below xml and want to validate if name = item1 (attribute) then value = 40000 (element) AND if name = item2 then value = 51000
. I don't want to use xml 1.1
version.
I am beating my head from 3 days and found limitations of XSD. Is there other best way which can be incorporated in schema file itself to perform this metadata validation rather to write some code. Schematron is not a option too. Also there are 100 items to validate with exact value in value element
<?xml version="1.0" encoding="UTF-8"?>
<pref>
<item name="item1">
<item_des> Controls ac </item_des>
<context name="conx">
<value>40000</value>
</context>
</item>
<item name="item2">
<item_des>Determine dc</item_des>
<context name="conx">
<value>51000</value>
</context>
</item>
</pref>