M
mark.van.der.voort
Hi,
I have defined a simple key/keyref validation for describing a tree.
<xs:key name="key_member">
<xs:selector xpath=".//member"/>
<xs:field xpath="@id"/>
</xs:key>
<xs:keyref name="ref_parent_member" refer="key_member">
<xs:selector xpath=".//member"/>
<xs:field xpath="@parentid"/>
</xs:keyref>
However, the parentid attribute is not mandatory, hence top-level
elements will not specify a parentid attribute.
This combination worked fine in XMLSPY 2004, but the exact same files
give the following error message in XMLSY 2005:
"The <keyref> identity constraint ... did not match any elements"
It disappears when at least one element has a parentid attribute.
Is it correct that a keyref constraint implies that at least one
attribute exists, and if so how would one specify a multirooted tree?
thx,
Mark van der Voort
I have defined a simple key/keyref validation for describing a tree.
<xs:key name="key_member">
<xs:selector xpath=".//member"/>
<xs:field xpath="@id"/>
</xs:key>
<xs:keyref name="ref_parent_member" refer="key_member">
<xs:selector xpath=".//member"/>
<xs:field xpath="@parentid"/>
</xs:keyref>
However, the parentid attribute is not mandatory, hence top-level
elements will not specify a parentid attribute.
This combination worked fine in XMLSPY 2004, but the exact same files
give the following error message in XMLSY 2005:
"The <keyref> identity constraint ... did not match any elements"
It disappears when at least one element has a parentid attribute.
Is it correct that a keyref constraint implies that at least one
attribute exists, and if so how would one specify a multirooted tree?
thx,
Mark van der Voort