jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sébastien Launay <sebastien.lau...@anyware-tech.com>
Subject Re: jcr:deref problem
Date Wed, 18 Jun 2008 13:33:11 GMT
Hi Emmanuel,

As defined in JSR 170 specification, the second parameter of jcr:deref()
is a node test which is a string to match the target node name.

So, it can not be used to match a node type.

But you may add a condition on jcr:primaryType :

jcr:root/kmelia60/element(*, slv:node)/jcr:deref(@slv:translations,'*')[@jcr:primaryType =
'slv:i18nNode' and @slv:name='Theme for Tests']

Sébastien LAUNAY

ehsavoie a écrit :
> Hi,
> I hve a xpath query using jcr:deref.
> If I define the referenced node's type I get no result :
> /jcr:root/kmelia60/element(*, slv:node)/jcr:deref(@slv:translations,
> 'slv:i18nNode')[@slv:name='Theme for Tests']
> whereas if I set '*' :
> /jcr:root/kmelia60/element(*, slv:node)/jcr:deref(@slv:translations,
> '*')[@slv:name='Theme for Tests']
> I get the correct results which are all of the expected type.
> Is this a bug or am I wrong in my query ?
> Emmanuel

View raw message