W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2007

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

From: <bugzilla@wiggum.w3.org>
Date: Sat, 31 Mar 2007 23:28:46 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1HXn02-0004qv-IX@wiggum.w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:19 GMT