Woops... I fixed the whole thingie:

The XPath statement should be wrapped in "" ..

xindice xpath -c /db/addressbook -q "/person[fname='John']"

gave the correct result...

Sorry for bothering you all..

Cheers,

Michiel

$ -----Original Message-----
$ From: Michiel Verhoef [mailto:[EMAIL PROTECTED]
$ Sent: woensdag 22 mei 2002 13:44
$ To: '[email protected]'
$ Subject: Xpath troubles
$ 
$ 
$ Hi All,
$ 
$ Now I've got Xindice working after fixing the classpath 
$ issues. I tried the
$ addressbook examples
$ and bumped into some funny problems (loading the example 
$ files (and ones
$ made by me) went ok.):
$ 
$ When querying the addressbook I could not get de square 
$ brackets ([]) to
$ work :-( I have been working 
$ with XSLT/FO and XPath for quite a while now (mainly using 
$ Xalan, the XSLT
$ processor supplied with 
$ Xindice) but all I could get was some sort of "Select *" or 
$ "select fname"
$ or something. When supplying
$ a condition I got empty results.
$ 
$ Anybody any ideas what I could be doing wrong here?
$ 
$ Like I said, I used the addressbook example. The following DOES work:
$ 
$ xindice xpath -c /db/addressbook -q /person
$ 
$ The following gives no results:
$ 
$ xindice xpath -c /db/addressbook -q /person[fname="John"]
$ 
$ When checking the XPath statement in XPath visualiser it gave 
$ me a result,
$ there is an address for
$ someone with a firstname "John".
$ 
$ Thanks in advance,
$ 
$ Michiel
$ 
$ 

Reply via email to