barbapapaz wrote:
Hello
I use a dom builder and I have a problem with a key to validate an id in
more than one element.
This key don't work
<xs:key name="IdKey">
<xs:selector xpath="./book/chapter|./book/page"/>
<xs:field xpath="@Id"/>
</xs:key>
What doesn't work?
but this work
<xs:key name="IdKey">
<xs:selector xpath="./book/page"/>
<xs:field xpath="@Id"/>
</xs:key>
I deduce that | isn't possible in the selector.
That's not true:
http://www.w3.org/TR/xmlschema-1/#coss-identity-constraint
Perhaps if you provided more information, like a small document and schema,
or even just more details about what's not working, someone can help.
Dave