[xquery-talk] flowrrr - how to structure a function?

Michael Kay mhk at mhk.me.uk
Tue Oct 17 18:43:14 PDT 2006


> I wonder how other processors work. I read somewhere that you 
> can use Saxon as eXist's XQuery processor

No, you can use Saxon instead of eXist's XQuery processor.
> 
> Do other processors evaluate sequences in order?

There are some cases where Saxon won't evaluate sequences in order, though
it tries to make pessimistic assumptions when it comes to calling extension
functions (for example, it won't evaluate them at compile time even if all
the arguments are known). The one that usually throws people is with
variable declarations. If you do

let $x := f()
let $y := g()
let $z := h()
return ($y, $x)

then g() will be evaluated before f(), and h() won't be evaluated at all -
at any rate, that's the situation this week.

Michael Kay
http://www.saxonica.com/



More information about the talk mailing list