jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Order By in XPath
Date Wed, 06 Dec 2006 09:46:14 GMT
Ted Roeloffzen wrote:
> Is there a standard way to order the results of an XPath query.
> In SQL you would use order by, but does XPath have an equivelant?

no, strict XPath doesn't. but JSR 170 specifies an extension to standard XPath 
which is borrowed from XQuery.

See spec section 6.6.5.5

Example:

//element(*, car)[@colour='green'] order by @price ascending


regards
  marcel

Mime
View raw message