xml-xindice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Fritz <fr...@mpib-berlin.mpg.de>
Subject xpath query not working with xindice 1.0
Date Thu, 27 Nov 2003 17:50:35 GMT
Hi all,

I installed xindice 1.0 (xml-xindice-1.0.zip) and tried the examples from
http://xml.apache.org/xindice/guide-user.html

Even the example is not working!!!

what I did was:

1) creating the collection(s) (in the user guide is not explained
   how to do that)
2) adding a document from data.xml:

<?xml version="1.0"?>
<product product_id="120320">
<description>Glazed Ham</description>
</product>

3) trying to retrieve this document with the xpath-query from the user
   guide:

xindice xpath_query -c /db/data/products -q /product[@product_id="120320"]

result: NOTHING!!

the document IS in the db, because when I use the following query:

xindice xpath_query -c /db/data/products -q /product

the document is found.

But why is the xpath-query from the example not working??

If you want to see what I did in detail, here it is:

C:\>xindiceadmin add_collection -c /db -n data
Created : /db/data
C:\>xindiceadmin add_collection -c /db/data -n products
Created : /db/data/products
C:\>xindiceadmin add_document -c /db/data/products -f data.xml
Added document /db/data/products/119c0d8d1c6f9f79000000f91e42f47b
C:\>xindice xpath_query -c /db/data/products -q /product[@product_id="120320"]
C:\>xindice xpath_query -c /db/data/products -q /product
<?xml version="1.0"?>
<product product_id="120320" xmlns:src="http://xml.apache.org/xindice/Query" src
:col="/db/data/products" src:key="119c0d8d1c6f9f79000000f91e42f47b">
<description>Glazed Ham</description>
</product>

thanks in advance
Tobias


-- 
Tobias Fritz
Max Planck Institute for Human Development
fritz@mpib-berlin.mpg.de
http://www.mpib-berlin.mpg.de/


Mime
View raw message