|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] get highest numberMichael Kay mike at saxonica.comWed May 14 15:20:00 PDT 2008
> Or switch to a better XQuery processor. I find it hard to > imagine why a product should take noticeably longer to > evaluate max(//@id) than it takes to evaluate //@id. Or if you can't do that, try coding it yourself as declare function local:max($n as xs:double+) { if (count($n) eq 1) then $n else let $halfway = count($n) idiv 2 let $maxleft = local:max($n[position() le $halfway) let $maxright = local:max($n[position() gt $halfway) return if ($maxleft gt $maxright) then $maxleft else $maxright }; local:max(//@id/number()) Michael Kay http://www.saxonica.com/
|
Purchase Stylus Studio Online Today!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






