You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Michael Korat <mi...@hms.org> on 2007/08/22 10:34:32 UTC

query with predicate after multiple jcr:deref returns empty result

Hi all!

I'm facing the problem that I can't use a predicate after a jcr:deref if
the 
query contains multiple jcr:deref. If the last element before the
predicate
is not jcr:deref it works as expected.

For example, the following query always returns empty results:
/jcr:root//element(*, my:LOLink)/jcr:deref(@my:linkedLO,
'*')//element(*, my:DataLink)/jcr:deref(@my:linkedData,
'*')[jcr:contains(., '" + searchTerm + "')]

On the other hand, the following querys return proper results:
/jcr:root//element(*, my:LOLink)/jcr:deref(@my:linkedLO,
'*')//element(*, my:DataLink)/jcr:deref(@my:linkedData, '*')/element(*,
my:content)[jcr:contains(.,'" + searchTerm + "')]";

/jcr:root//element(*, my:LOLink)/jcr:deref(@my:linkedLO,
'*')[jcr:contains(.,'" + searchTerm + "')]";

Regards
Michael Korat