You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Oliver Klee <ol...@fit.fraunhofer.de> on 2004/05/03 16:49:05 UTC
Re: Accessing an attribute through XPath
Hi,
Vadim Gritsenko schrieb:
> Hm... I think this one is shorter and does the same:
> ./xindice xpath -c /db/test/ -q
> "//Person[count(Vorname)=1][Nachname/following-sibling::Geburtsname/@value]/@mitarbeitInProjekt"
... and results in the same error message. =:-(
> So, it might be some new bug in Xindice. Can you send sample XML file so
> it's possible to reproduce the bug, or find the problem?
I've attached the document. It can also be found at
http://www.jeckle.de/vorlesung/xml/examples/projektverwaltung4.xml .
Steps to reproduce:
1. Create a collection "/db/test/".
2. Insert the document into /db/test/.
3. Do one of the following queries:
./xindice xpath -c /db/test/ -q
"//Person[count(Vorname)=1]/Nachname[following-sibling::Geburtsname[@value]]/parent::Person/@mitarbeitInProjekt"
./xindice xpath -c /db/test/ -q
"//Person[count(Vorname)=1][Nachname/following-sibling::Geburtsname/@value]/@mitarbeitInProjekt"
Expected result:
"mitarbeitInProjekt" nodes
Actual result:
Error message: org.xmldb.api.base.XMLDBException: Failed to execute
command 'Query' on server: http://127.0.0.1:8888/xindice/, message:
java.lang.Exception: org.w3c.dom.DOMException: This Node Cannot Contain
This Child
Greets
Oliver
--
Oliver Klee
Fraunhofer Institute for Applied Information Technology (FhG-FIT)
Office C5-118b, Schloss Birlinghoven, 53754 Sankt Augustin
Phone +49 02241 14-2943, Mobile +49 179 9594731