Returns an empty result if I omit the surrounding quotes

At 06:15 PM 9/29/2003 +0200, you wrote:
omit the surrounding quotes.

  Wolfgang

Shilpa R. Kelkar wrote:

Using single quotes around literals and double quotes around the entire query gives me an error:

Query:
xindice xpath -c /db/partsdb -q "//[EMAIL PROTECTED]'101']"

Error:
=101]""=="" was unexpected at this time.

I am new to xindice as well as Xpath..so let me know if I am missing anything.

Shilpa


At 04:35 PM 9/26/2003 -0400, you wrote:

> xindice xpath_query -c /db/partsdb -q /parts/[EMAIL PROTECTED]'']

should return all parts with empty sku attribute

> xindice xpath_query -c /db/partsdb -q /parts/[EMAIL PROTECTED]'101']

should return all parts with sku='101'

I would not recommend using double-quotes on the dos prompt.
Use single-quotes around literals instead.

When I ran from the command line, I used bash even on windows
due to its superior control over escaping/quoting characters.
There are some things that are perhaps impossible to
do from the dos command prompt.

-Terry

Shilpa R. Kelkar wrote:

If I type :

xindice xpath_query -c /db/partsdb -q /parts/[EMAIL PROTECTED]""]

I have a collection partsdb and document parts. Above query results back in xml :

<?xml version="1.0"?>
<part sku="101" xmlns:src="http://xml.apache.org/xindice/Query"; src:col="/db/par
tsdb" src:key="parts">
<desc>Ball Bearing</desc>
<maker>S.K.F.</maker>
<instock>Yes</instock>
<price>$20.00</price>
</part>
<?xml version="1.0"?>
<part sku="102" xmlns:src="http://xml.apache.org/xindice/Query"; src:col="/db/par
tsdb" src:key="parts">
<desc>Gasket</desc>
<maker>A.B.C.</maker>
<instock>Yes</instock>
<price>$2.00</price>
</part>



Although query
xindice xpath_query -c /db/partsdb -q /parts/[EMAIL PROTECTED]"101"] does not work.
I am trying to execute this on dos prompt.









At 01:53 PM 9/26/2003 -0400, you wrote:

1)       ([EMAIL PROTECTED]"101"]       is not a valid XPath

2) If running from MSDOS command line, quoting is problematic.
Try, for instance, using single quotes instead of double for literal values (e.g. '101' instead of "101")
and try enclosing the entire expression in double quotes (e.g. "//[EMAIL PROTECTED]'101'] ").


-Terry

Shilpa R. Kelkar wrote:

Hello..

I am using Xindice command line tool.
I tried the Xpath query on url http://www-106.ibm.com/developerworks/opensource/library/wa-xindice.ht ml for querying a document ([EMAIL PROTECTED]"101"].


I followed all the steps given on the page. It does not give me any results but just returns to the prompt.

Any help is appreciated.
Shilpa







Reply via email to