Hi Joe,
But wouldn't getSize() on the getNodes() call only get the immediate child nodes?
No. It would include everything that matched your query which would include all the nodes in the QueryResult. So the node iterator returned from QueryResult.getNodes() will contain all the nodes that matched the query. In your case:
/jcr:root/foo//* ... will return the nodes /foo/bar /foo/bar/baz ... and the QueryResult.getNodes().getSize() should return 2
I'll keep investigating - I still find the Xpath rules a problem. :/
What do you find a problem about it? Do you prefer the SQL syntax? regards, david
