jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fidel GarcĂ­a Quesada <fide...@gmail.com>
Subject searching with xpath
Date Thu, 16 Jul 2009 10:47:30 GMT
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,

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,

and then go to bbb's parent. But I readed that parent axis is not supported
by jackrabbit.

Can someone help me?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message