Force reference for everey instance of a key attribute
Posted: Wed Feb 07, 2007 7:39 pm
Hi,
i want to define an XML Schema with a key attribute inside one element and a keyref attribute inside another element referencing to this key. Thats no problem at all. Additionally I want to enforce, that every key will be hit by at least one keyref, so that the xml-code below would be not validated, because a2key is not referenced by any keyref.
Knows anyone a solution for that problem?[/b]
i want to define an XML Schema with a key attribute inside one element and a keyref attribute inside another element referencing to this key. Thats no problem at all. Additionally I want to enforce, that every key will be hit by at least one keyref, so that the xml-code below would be not validated, because a2key is not referenced by any keyref.
Code: Select all
<a name="a1" key="a1key"/>
<a name="a2" key="a2key"/>
<b name="b1" keyref="a1key"/>
<b name="b2" keyref="a1key"/>
Knows anyone a solution for that problem?[/b]