You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by "Asmann, Roland" <Ro...@adesso.at> on 2011/07/08 18:28:48 UTC

Problem with XPath

Hi,

I am new to the list, so please excuse me if this has already been asked 
(couldn't find it though, but maybe I just missed it).

I am having some problems when querying the repository with XPath. I 
have a property that is multi-value and I want to use the 'jcr:contains' 
function on it.
My query looks like this:

//content/documents/svportal//*[@hippo:availability = ''live'' and 
jcr:contains(@svportal:changes, ''{0}'')]

In this query I let MessageFormat replace the placeholder with the 
actual String I want to search.

For some reason, I don't get a value here, although I am sure there is 
data in the property.

A similar query (although on a single-value property) works:

//content/documents/svportal//*[@hippo:availability = ''live'' and 
jcr:contains(@svportal:version, ''{0}'')]

Am I making a mistake here or is this functionality not available in 
JackRabbit?

Thanks,

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asmann@adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------