Am 26.03.2002 19:01 Uhr schrieb "Paul Caton" unter
<[EMAIL PROTECTED]>:

> I'm running Xindice 1.0 on a Red Hat Linux box, using a Bash
> shell. This is just a note that might help folks with a similar setup
> avoid wasting time trying to discover why some commandline XPath
> queries don't work. When you give a query like this:
> 
>    xindice xpath -c /db/pebbles -q /[EMAIL PROTECTED]"hard"]
> 
> which is almost identical to Example 5.1 in the commandline tools
> reference doc, you might find Xindice returns nothing at all. This is
> because you need to escape the quote marks, like so:
> 
>    xindice xpath -c /db/pebbles -q /[EMAIL PROTECTED]"hard\"]
> 
> Similarly, if your XPath includes a function you must escape the
> parentheses, eg:
> 
>    xindice xpath -c /db/pebbles -q /rock[position\(\)=1]
> 
> I appreciate this is basic Unix stuff, but when you're focusing on
> Xindice it's easy to forget, and the documentation doesn't remind you,
> and neither the server nor the shell will return an error message in
> response to the command. I wasted a good while before smacking myself
> upside the head when I realised what was wrong ;-)
> 
> Paul.


I use a bash shell under Solaris and have no problems at all.
But I also use single quotes around the query itself, e.g.

xindice xpath -c /db/pebbles -q '/[EMAIL PROTECTED]"hard"]'

I think this syntax is mentioned in the documentation.

Carsten

--

Medizinische Hochschule Hannover                    Fachhochschule Hannover
Abt. H�matologie und Onkologie     FB Informations- und Kommunikationswesen
Carl-Neuberg-Stra�e 1                               Ricklinger Stadtweg 120
30625 Hannover                                               30459 Hannover

                           ++49-511-9296-1650
                    http://summit-bmt.fh-hannover.de





Reply via email to