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::[EMAIL PROTECTED]/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
<?xml version="1.0" encoding="ISO-8859-15"?> <ProjektVerwaltung xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="L:\vorlesung\xml\examples\projektverwaltung3.xsd"> <Person PersID="Pers01" mitarbeitInProjekt="Prj01"> <Vorname>Hans</Vorname> <Nachname>Hinterhuber</Nachname> </Person> <Person PersID="Pers02" mitarbeitInProjekt="Prj02"> <Vorname>Franz</Vorname> <Vorname>Xaver</Vorname> <Nachname>Oberm�ller</Nachname> <Qualifikationsprofil> <xhtml:u>IT-Kompetenz</xhtml:u> <xhtml:em>verschiedene</xhtml:em> Betriebssysteme und <Leistungsstufe>professionelle</Leistungsstufe> <xhtml:em> <Qualifikation>Programmierung</Qualifikation> </xhtml:em> verschiedener Programmiersprachen <xhtml:em> <xhtml:u> <Qualifikation>Entwickler</Qualifikation> </xhtml:u> </xhtml:em> von 1988-1990 <xhtml:u> <Qualifikation>Projektleiterfunktion</Qualifikation> </xhtml:u> von <xhtml:b>1990-93</xhtml:b> im X42-Projekt in Abteilung AB&C </Qualifikationsprofil> </Person> <Person PersID="Pers03" mitarbeitInProjekt="Prj02"> <Vorname>Fritz</Vorname> <Nachname>Meier</Nachname> <Geburtsname value="Huber"/> </Person> <Projekt ID="Prj01" Projektleiter="Pers01" Mitarbeiter="Pers01"/> <Projekt ID="Prj02" Projektleiter="Pers02" Mitarbeiter="Pers03"/> </ProjektVerwaltung>
