On 7/4/07, Marcel Reutegger <[EMAIL PROTECTED]> wrote:
bilobag wrote:
> Does anyone know how to order a collection of child nodes by a specific
> property from the getNodes() call? or do i have to manually order the nodes
> using java?  Please let me know if you have any ideas.  Is there a way to
> query just for a parents child nodes and put an order by clause in the
> query?

sure:

/jcr:root/foo/bar/* order by @prop

but depending on the number of nodes, manually ordering them might be more
efficient than executing a query.


I thought the OP was asking if there is any API that allows:

Node.getNodes(<some_sort_criteria>)

I think the spec covers this in the Ch.4.4: Orderable Child Nodes.

./alex
--
.w( the_mindstorm )p.

regards
   marcel

Reply via email to