xml-xindice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From patrick.refond...@extentis.com
Subject no result while querying element attributes
Date Wed, 21 May 2003 01:10:33 GMT

I am using the addressbook example from the command line.
The following queries return results as expected:

xindice xpath -c /db/addressbook -q /person
xindice xpath -c /db/addressbook -q //address

But when I try restraining the selection based upon attribute value I get no
result, here is the query:

xindice xpath -c /db/addressbook -q //address[@type="home"]


The xml documents stored in the addressbook collection are the following:

<?xml version="1.0"?>
<person>
   <fname>John</fname>
   <lname>Smith</lname>
   <phone type="work">563-456-7890</phone>
   <phone type="home">534-567-8901</phone>  
   <email type="home">jsmith@somemail.com</email>
   <email type="work">john@lovesushi.com</email>
   <address type="home">34 S. Colon St.</address>
   <address type="work">9967 W. Shrimp Ave.</address>
</person>

<?xml version="1.0"?>
<person>
   <fname>SlackJawedLocal</fname>
   <lname>Cletus</lname>
   <phone type="work">123-456-7890</phone>
   <phone type="home">234-567-8901</phone>
   <phone type="cell">345-678-9012</phone>
   <email type="home">cletus@hotmail.com</email>
   <email type="work">cletus@micrsquish.com</email>
   <address type="home">1234 S. Elm St.</address>
   <address type="work">4567 W. Pine St.</address>
</person>

I would have expected to get two matched :

   <address type="home">34 S. Colon St.</address>
   <address type="home">1234 S. Elm St.</address>

I am quite new to both Xindice and Xpath so I might miss some evidence !

Any comment welcome, P. 

Mime
View raw message