Schematron question

D

disteve

Can Schematron validate that an attribute value is unique within an XML
document? If so, what would the assert or report tests be? See below.

Ex.

<ALLOCATION type="CLASS" name="CLASS A"><!-- OK, "name" unique -->
<CLASS priority="1" name="Highest Priority">
<STORE name="Walmart A 1 1">1000</STORE>
<STORE name="Walmart A 1 2">1001</STORE> 2">
</CLASS>
<ALLOCATION type="CLASS" name="CLASS B"><!-- OK, "name" unique -->
<CLASS priority="1" name="Highest Priority">
<STORE name="Walmart A 1 1">1000</STORE>
<STORE name="Walmart A 1 2">1001</STORE> 2">
</CLASS>
<ALLOCATION type="CLASS" name="CLASS B"><!-- FAILED, not unique -->
<CLASS priority="1" name="Highest Priority">
<STORE name="Walmart A 1 1">1000</STORE>
<STORE name="Walmart A 1 2">1001</STORE> 2">
</CLASS>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top