jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ottinger, Joseph" <jottin...@techtarget.com>
Subject count of nodes?
Date Wed, 18 Apr 2007 15:51:47 GMT
Hi. I'm trying to get a count of nodes under a specific node. To
explain, imagine the following tree:
 
<foo>
    <bar>
        <baz />
    </bar>
</foo>
 
Given a path to /foo (via UUID), what I want to do is get a count
including both <bar> and <baz> -- i.e., I want to get a result of "2". 
 
Using XPath, the query should be something like -- pardon me my horrible
syntax, k? -- 
 
count(//*[jcr:uuid=$uuid]/*)
 
However, count() is unsupported. So I'm kinda stuck, unless I want to
walk the tree under /foo, and I don't unless I have no choice.
 
Any suggestions?

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