That was it ! Following this I have also been able to run queries using the java API.
For info. this all run using: RedHat Linux 7.3 JDK 1.4.0 from IBM Tomcat 4.0.6-LE Xindice CVS (1.1) Thanks a lot, Patrick Quoting C�dric Viaud <[EMAIL PROTECTED]>: > You have to double-quote the queries : > > xindice xpath -c /db/addressbook -q "//[EMAIL PROTECTED]'home']" > > Hope this helps, > > C�dric > > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Wednesday, May 21, 2003 3:10 AM > Subject: no result while querying element attributes > > > > > > 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 //[EMAIL PROTECTED]"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">[EMAIL PROTECTED]</email> > > <email type="work">[EMAIL PROTECTED]</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">[EMAIL PROTECTED]</email> > > <email type="work">[EMAIL PROTECTED]</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. > > > >
