Hi, 2009/7/16 Fidel García Quesada <[email protected]>: > Hi, this is a simple question but i am newbie with jackrabbit and xpath > > I have this in my repository: > > ..../aaa[1]/bbb[1]/tag = "1" > ..../aaa[1]/bbb[1]/ccc/text = "text_demo1" > ..../aaa[1]/bbb[2]/tag = "2" > ..../aaa[1]/bbb[2]/ccc/text = "text_demo2" > ..../aaa[2]/bbb[1]/tag = "1" > ..../aaa[2]/bbb[1]/ccc/text = "text_demo3" > ..../aaa[2]/bbb[2]/tag = "2" > ..../aaa[2]/bbb[2]/ccc/text = "text_demo1" > > > i want select aaa who contains ((bbb with tag=1) AND (bbb(the same) who > contains ccc with text_demo1)), that's aaa[1] > > I tried : > /jcr:root//element(*, aaa) [...@bbb/tag='1' and jcr:contains(@bbb/ccc/text, > 'text_demo1')] > > but I have aaa[1] AND aaa[2] and I only want aaa[1] > > > I thought : > /jcr:root//element(*, bbb) [...@tag='1' and jcr:contains(@ccc/text, > 'text_demo1')] > > and then go to bbb's parent. But I readed that parent axis is not supported > by jackrabbit.
it will be supported in the 2.0 release. for now you'll have to do that step manually when you iterate over the result set. regards marcel
