jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Podatelev" <brightnesslev...@gmail.com>
Subject Select all leafs of a tree w/XPath
Date Tue, 04 Nov 2008 00:45:54 GMT
Hello JackRabbit people,

I have a problem with selection of all leaf nodes of my tree.
The tree consists of nodes of type nt:unstructured named "testnode".

I want to select all the nodes that have no children, that is, all the
leafs.
However, the "//testnode[not(testnode)]" query gives zero results.

What is a bit more confusing, is that the "//testnode[testnode]" query
returns all the elements of the tree, not just the ones that have at least
one child of name "testnode".

How should I select leafs?

I'm sorry if the question is too dumb, but I'm not closely familiar nor to
XPath neither to JackRabbit.

-- 
sp

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