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 clholm <vp...@earthlink.net> on 2002/05/14 01:32:04 UTC

Xpath query syntax

Hello,

Regarding Xpath queries and Xindice.

I am finding the expected results* after running the following:

             xindice xpath -c /db/vp/ -q /products


However, when I run either of the following:

            xindice xpath -c /db/vp -q
/products[@product_id="VPU-1001"]
            (as per example 5.1 in the Xindice Command Line Tools
Reference)

             xindice xpath -c /db/vp -q
"/products[@product_id='VPU-1001']" ,

then  Xindice draws a blank.

*<?xml version="1.0"?>
<products xmlns:src="http://xml.apache.org/xindice/Query"
src:col="/db/vp" src:key="prods">
<product product_id="VPU-1001">
   <title>Mamadou Ly Mandinka Drum Master</title>
   <description>Mandinka drumming</description>
</product>
<product product_id="VPU-1002">
   <title>Tabala Wolof</title>
   <description>Sufi drumming</description>
</product>
</products>

I may be overlooking  something entirely obvious, but would appreciate
hearing from
anyone who has been successful with this kind of query.

Thanks,

Carl Holm
vpulse@earthlink.net





Hello,

Regarding Xpath queries and Xindice.

I am finding the expected results* after running the following:

             xindice xpath -c /db/vp/ -q /products


However, when I run either of the following:

            xindice xpath -c /db/vp -q
/products[@product_id="VPU-1001"]
            (as per example 5.1 in the Xindice Command Line Tools
Reference)

             xindice xpath -c /db/vp -q
"/products[@product_id='VPU-1001']" ,

then  Xindice draws a blank.

*<?xml version="1.0"?>
<products xmlns:src="http://xml.apache.org/xindice/Query"
src:col="/db/vp" src:key="prods">
<product product_id="VPU-1001">
   <title>Mamadou Ly Mandinka Drum Master</title>
   <description>Mandinka drumming</description>
</product>
<product product_id="VPU-1002">
   <title>Tabala Wolof</title>
   <description>Sufi drumming</description>
</product>
</products>

I may be overlooking  something entirely obvious, but would appreciate
hearing from
anyone who has been successful with this kind of query.

Thanks,

Carl Holm
vpulse@earthlink.net





Hello,

Regarding Xpath queries and Xindice.

I am finding the expected results* after running the following:

             xindice xpath -c /db/vp/ -q /products


However, when I run either of the following:

            xindice xpath -c /db/vp -q /products[@product_id="VPU-1001"]

            (as per example 5.1 in the Xindice Command Line Tools
Reference)

             xindice xpath -c /db/vp -q
"/products[@product_id='VPU-1001']" ,

then  Xindice draws a blank.

*<?xml version="1.0"?>
<products xmlns:src="http://xml.apache.org/xindice/Query"
src:col="/db/vp" src:key="prods">
<product product_id="VPU-1001">
   <title>Mamadou Ly Mandinka Drum Master</title>
   <description>Mandinka drumming</description>
</product>
<product product_id="VPU-1002">
   <title>Tabala Wolof</title>
   <description>Sufi drumming</description>
</product>
</products>

I may be overlooking something entirely obvious, but would appreciate
hearing from anyone who has been successful with this kind of query.

Thanks,

Carl Holm
vpulse@earthlink.net