[Bug 4441] [XQuery] 2.3.4 Optimization rules unclear?

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4441





------- Comment #3 from mike@saxonica.com  2007-03-31 23:28 -------
<quote>
let $env := local:prepareEnvironment()
return ($env, local:do-something())

This enforces evaluation of the method body in all implementations
</quote>

Well, it's not 100% guaranteed. But Saxon for example is careful to treat an
external function with a Java return type of "void" as having a static type of
item()* rather than empty-sequence(), to stop the optimizer doing anything
"clever" with such a construct.

It can still be difficult to enforce the order in which such functions are
evaluated.

Michael Kay

Received on Saturday, 31 March 2007 23:28:51 UTC