Hi Jeff and Michael -
Thanks for your suggestions, however, they also do not seem to work for
me accessing documents in the Xindice database. (Do they work for you
using the Xindice command tools?) 

It seems to me that this is Xindice-specific and has to do with how
XPath and XIndice interact because the "isModified=" and the
isModified/text(), etc. methods actually return the Xindice document
i.e.:

<isModified xmlns:src="http://xml.apache.org/xindice/Query";
> src:col="/db/catie_3
> 3eecca6-6921-44d2-a191-861a77bc5d82/session_xml"
> src:key="841c44e9-54b9-4204-b0d
> 2-f7bf0ed81426">false</isModified>

instead of the value "false". 

Do you have other suggestions or is there something I missed in your
emails?

Thanks again for the help!

Catie



-----Original Message-----
From: Jeff Greif [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 30, 2002 12:46 PM
To: [email protected]
Subject: Re: XPath details [Repeat Posting]


Catie,

The post you quote is not relevant to your query.  That post has to do
with
trying
to retrieve *only* an attribute value -- Xindice/xmldb requires that the
containing element of that attribute be returned.

I think your XPath query that isn't quite right.  This works for me
(using
Xalan outside Xindice) on your document:

  '/session/header[isModified="false"]'

The way I read this query is "retrieve the header children of the
session
root element which have isModified elements whose string value is
'false'."
The part before the left square bracket is what is to be retrieved, and
you
can think of the left square bracket as meaning 'such that' and carrying
the
node context of the expression preceding.  Thus expr1 [expr2] means
retrieve
all nodes matching expr1 such that expr2 is true, with expr2 evaluated
in
the context of each node selected by expr1.

Jeff

----- Original Message -----
From: "Kanarinka" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, April 30, 2002 8:46 AM
Subject: XPath details [Repeat Posting]


> Hi all,
>
> Related to this post -- does this mean that I cannot write an XPath
> query that selects based on the value of an element?
> For example (see the below document), say I want to select the
<header>
> element only when the value of <isModified> is false.
>
> It seems that I cannot do this - e.g. selecting
> "/session/header[isModified='false']" yields no result on the below
> document because it seems that "isModified=" will always compare
against
> the entire isMOdified document whose value in this case is:
>
> <isModified xmlns:src="http://xml.apache.org/xindice/Query";
> src:col="/db/catie_3
> 3eecca6-6921-44d2-a191-861a77bc5d82/session_xml"
> src:key="841c44e9-54b9-4204-b0d
> 2-f7bf0ed81426">false</isModified>
>

Reply via email to