jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@day.com>
Subject Re: Searching linked files
Date Thu, 02 Nov 2006 10:12:27 GMT
Jaka Jaksic wrote:
> //element(*, nt:linkedFile)[jcr:contains(@jcr:content, 'search string')]

the jcr:content property on nt:linkedFile is a reference property and matching 
the uuid against 'search string' will of course never match.

> //element(*, nt:linkedFile)[jcr:contains(jcr:deref(@jcr:content, '*'),
> 'search string')]

this one does not work because the jcr:contains function only allows a reference 
to the current node or a property of the current node.

> //element(*, nt:linkedFile)[jcr:deref(@jcr:content, '*')/jcr:contains(.,
> 'search string')]

predicates in jackrabbit currently do not support the child axis. Only the 
attribute axis (jcr property name) is possible.

> One possible solution would be to search the resource nodes, then manually
> call getReferences() on each returned node etc., but this would require a
> lot of roundtripping and I would feel like I'm reinventing the wheel...

That's currently the only way to get to linkedFile nodes. Why do you think this 
workaround will cause a lot of round trips?

> Is there a *proper* solution to this problem?

The proper solution is to fix issue JCR-247 :-/


View raw message