From: Jorge C. <jor...@de...> - 2007-12-05 08:50:00
|
Hi Rudolf, do you get any error message?=20 maybe the problem is that you have to specified the namespaces in the xml elements like: <cl:clause xmlns=3D"http://www.epo.org/namespaces/clauses" xmlns:cl=3D"http://www.epo.org/namespaces/clauses"> [...] <cl:clause-categories> [...] or rewrite the xquery without the namespace. i dont know, but you can try. El mi=C3=A9, 05-12-2007 a las 09:22 +0100, Rudolf de Grijs escribi=C3=B3: >=20 > Dear eXist users,=20 >=20 > My name is Rudolf de Grijs and I'm a newby to eXist. =20 >=20 > At the moment I'm using eXist via XML:DB with success ;), but I do > have a nasty problem.=20 >=20 > I have stored the following document into eXist=20 >=20 > <clausexmlns=3D"http://www.epo.org/namespaces/clauses"xmlns:htm=3D"http:/= /www.w3.org/1999/xhtml"creation-date=3D"05-12-2007"unique-form=3D"false"pub= lic=3D"false"clause-id=3D"36682ff1ed8dc308_-47d5d398_116a949f2b9_-7ff5">=20 > <metadata>=20 > <user-id>rd83136</user-id>=20 > <procedure-and-phase>S</procedure-and-phase>=20 > </metadata>=20 > <name>PrivateClause2</name>=20 > <descriptions>=20 > <contentlanguageName=3D"NL">=20 > <description>openbaar</description>=20 > <singular>=20 > <htm:html>=20 > <htm:head>=20 > <htm:title>singular</htm:title>=20 > </htm:head>=20 > <htm:body>Algemeen bruikbaar</htm:body>=20 > </htm:html>=20 > </singular>=20 > <plural>=20 > <htm:html>=20 > <htm:head>=20 > <htm:title>plural</htm:title>=20 > </htm:head>=20 > <htm:body>Algemeen bruikbare clausules</htm:body>=20 > </htm:html>=20 > </plural>=20 > </content>=20 > <contentlanguageName=3D"EN">=20 > <description>public</description>=20 > <singular>=20 > <htm:html>=20 > <htm:head>=20 > <htm:title>singular</htm:title>=20 > </htm:head>=20 > <htm:body>General clause</htm:body>=20 > </htm:html>=20 > </singular>=20 > <plural>=20 > <htm:html>=20 > <htm:head>=20 > <htm:title>plural</htm:title>=20 > </htm:head>=20 > <htm:body>General clauses</htm:body>=20 > </htm:html>=20 > </plural>=20 > </content>=20 > </descriptions>=20 > <clause-categories>=20 >=20 > <ref-categoryref-id=3D"36682ff1ed8dc308_-47d5d398_116a949f2b9_-7ffb"/>=20 > </clause-categories>=20 > <statisticsuse-count=3D"1"last-used=3D"2007-12-05T08:51:48.213 > +0100"/>=20 > </clause>=20 >=20 > So far so good. When I try to get the documents with the following > xquery I don't get any result. Could someone tell me what I'm doing > wrong?=20 >=20 > declare namespace cl =3D "http://www.epo.org/namespaces/clauses";=20 > for $clause in collection('/db/clause')/cl:clause where > $clause/cl:clause-categories/cl:ref-category/@ref-id =3D > "36682ff1ed8dc308_-47d5d398_116a949f2b9_-7ffb"=20 > return $clause=20 >=20 >=20 >=20 > Strangely enough I do get a result when I replace > $clause/cl:clause-categories/cl:ref-category/@ref-idwith > $clause/cl:clause-categories//@ref-id=20 > or$clause//@ref-id. Just to verify that the query is correct, I have > tried to use the same query within XML Spy and here I do get a result. > Has this something to do with the structural index?=20 >=20 > Kind regards,=20 > Rudolf de Grijs > ------------------------------------------------------------------------- > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > _______________________________________________ Exist-open mailing list E= xis...@li... https://lists.sourceforge.net/lists/listinf= o/exist-open --=20 ____________________________________ Jorge Martin Cuervo =20 Outsourcing Emarketplace deFacto Powered by Standards =20 email <jor...@de...> voice +34 985 129 820 voice +34 660 026 384 ____________________________________ [...] |