jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Kiehl <christ...@sulu3000.de>
Subject Re: Combined attribute test on childnode for xpath query
Date Wed, 11 Jul 2007 19:02:57 GMT
Marcel Reutegger wrote:

>> I need to execute a query like this:
>> //element(*, nt:foo)[test/*[@foo='a' and @bar='b']]
> I guess you rather mean:
> //element(*, nt:foo)[test[@foo='a' and @bar='b']]

Yes ;)

> but in any case, this is currently not possible in jackrabbit.

Could you give me a pointer what has to be done to support this? Is it a 
desirable feature at all?

Or is it maybe easier to implement support for the ancestor axis? The query 
could be rewritten like this:

//element(*, nt:foo)/test[@foo='a' and @bar='b']/..

>> This means I need all nodes of type "nt:foo" which have "foo=a" and 
>> "bar=b" on _one_ specific childnode. If I write it like that
>> //element(*, nt:foo)[test/@foo='a' and test/@bar='b']
> that's kind of the workaround for the above mentioned limitation.
>> it seems like the condition is matched if for example 
>> "test[1]/@foo='a' and test[2]/@bar='b'" is true.
> correct.
> looks like another argument for Davids DM Rule #4.

Well ... I think it's kind of a weak argument ;) I would better like to add the 
missing feature to Jackrabbit.


View raw message