XML How to validate that element value corresponds to an attribute value?

excell38660

New Member
So, I've got this xml with a part containing the "series" element with an "id" attribute.The hierarchy of elements is like this: ...-series-subseries-model-name-...I want to validate, that the "name" element value has all the first characters corresponding to the "id" attribute from "series", example would be:\[code\] ... <series id="RGD"> <subseries> <model> <name>RGD7320Z</name> ...\[/code\]Which schema language should I use (Schematron?) and how would that construct look like, if it was possible? Thanks! :-)
 
Back
Top