Hi -- I tried searching for this, but to no avail.
I have imported some XML nodes using Session.importXML(). Now I would like
to perform a query such as: "return al TAG1 nodes under TAG2":
<rootTAG>
...
<TAG2>
.....
<TAG1/> <- I would like to fetch this node here
.....
</TAG2>
...
</rootTAG>
Ideally, I coulod
SELECT * from [nt:base] as node
where
node.[jcr:path] LIKE '%/TAG2/%' and node.[jcr:path] LIKE '%/TAG1'
Well, maybe not ideally, as this would be slow, but it would be possible.
Problem is,
jcr:path seems to only work on jcr SQL (not SQL2). I could achieve this
with XPATH (also deprecated). Is there a way to achieve the same thing in
JCR_SQL2? I know ModeShape implements PATH(), and NAME(), but JackRabbit
seems not to, which leaves me at a loss on how to achieve this. I am trying
to switch to Oak hoping this will work here, but since that's not exactly
immediate to do, I wanted to ask whether this is achievable in Oak. Please
assume that I might add JOINs to that query, so going the deprecated way
isn't really an option.
Thank you, and apologies if this has actually already been asked -- I *did*
try searching, but nothing immediate seemed to pop up, though this seems
like a pretty basic issue: querying based on PATH patterns.
-- Alessandro.