DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10779>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10779 xpath selector problem of .//node in recursive elements Summary: xpath selector problem of .//node in recursive elements Product: Xerces2-J Version: 2.0.2 Platform: PC OS/Version: FreeBSD Status: NEW Severity: Major Priority: Other Component: XML Schema Structures AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Basically I have a recursive (tree) structure of one element type, so that I can create trees, i.e, the xml would look like this: <root> <relation id="r1"> <relation id="r2"/> <relation id="r3"> <relation id="r4"/> </relation> <some_other_element> <relation id="r5"/> </some_other_element> </relation> <relation id="r6"/> </root> In my xsd file I try to make the id a key, and i do this as follows (in the parent element of the top level relation element, i.e. the <root> element above): <xs:key name="relation_id"> <xs:selector xpath=".//relation"/> <xs:field xpath="@id"/> </xs:key> Now this selector only matches top level relation nodes, i.e. those with id's r1 and r6 in the above samples. It also matches descendants any level deep as long as it's the first relation element, i.e., above it would also match id r5. I have the .xsd and .xml files which generate the errors here: http://eeyore.sebster.com/~sebster/xerces/domain.xsd http://eeyore.sebster.com/~sebster/xerces/domain-schema.xml To get the error I run (jdk1.3.1): java sax.Counter -v -s -f domain-schema.xml (This gives me the following output): [Error] domain-schema.xml:103:10: Key with value [ID Value: r2] not found for identity constraint of element "domain". [Error] domain-schema.xml:103:10: Key with value [ID Value: r2] not found for identity constraint of element "domain". [Error] domain-schema.xml:103:10: Key with value [ID Value: r3] not found for identity constraint of element "domain". [Error] domain-schema.xml:103:10: Key with value [ID Value: r6] not found for identity constraint of element "domain". [Error] domain-schema.xml:103:10: Key with value [ID Value: r7] not found for identity constraint of element "domain". [Error] domain-schema.xml:103:10: Key with value [ID Value: r8] not found for identity constraint of element "domain". [Error] domain-schema.xml:103:10: Key with value [ID Value: r9] not found for identity constraint of element "domain". domain-schema.xml: 686 ms (71 elems, 40 attrs, 0 spaces, 989 chars) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
