I would like to validate a XML file with a schema for that values in the same node can’t be repeated. It’s important the order of the signatures. My invalid XML is:
<person>
<name>Peter Petrelli</name>
<subject1>Mathematics</subject1>
<note1>8.5</note1>
<subject2>Natural Science</subject2>
<note2>4.5</note2>
<subject3>Mathematics</subject3>
<note3>7</note3>
</person>
</school>
It’s not possible Mathematics is more than once.
How can i validate this with a XSD schema?
Thank you very much
With a more sensible design there would be no problem:
then the <unique> definition inside the <person> element could be: