This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
[Copied into Bugzilla from the comments list by CMSMcQ. See also thread beginning at http://lists.w3.org/Archives/Public/public-qt-comments/2005May/0217.html] We propose to add an optional clause to the external function declaration to indicate whether the external function always returns the same results for given argument values ("deterministic"). An example use case would be to allow users to indicate that two external functions embedded into xquery: f:random() and f:verySlowDeterministicExternalWebService() should be treated differently by the query processor. That can be implemented by changing FunctionDecl to [26] FunctionDecl ::= "declare" "function" QName "(" ParamList? (")" | (")" "as" SequenceType)) (EnclosedExpr | ("external" (<"not" "deterministic"> | "deterministic")?)) Daniel.
On May 16, the Query Working Group decided that we do not yet have enough with external functions to justify adding a "deterministic" clause to the syntax of a function declaration. Your request for this functionality will be reconsidered in a future version of XQuery. Please let us know whether you are satisfied with this resolution of your comment.