This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In the WD of XQuery 1.1 currently being prepared for internal WG review, EBNF production [31] reads: FunctionDecl ::= "declare" ("deterministic" | "nondeterministic")? ("private" | "public")? "function" QName "(" ParamList? ")" ("as" SequenceType)? (FunctionBody | "external") That syntax clearly allows: declare nondeterministic function X() external However, the 6th paragraph of Section 4.17, Function Declaration, says: An XQuery processor can use static analysis to determine whether a user-defined function is deterministic (the syntax of function declarations does not allow a user-defined function to be declared deterministic or nondterministic). (Note the typo: nondterministic.) The parenthesized statement is clearly incorrect. It states (what my memory suggests is) the intent of the WG, but it is not on its face a correct observation. Assuming that is the WG's intent, then a way must be found to make the limitation normative. Two approaches come to mind: One would rewrite the EBNF to have two alternatives, one for user-defined functions and the other for external functions. The other would have to define the limitation as a constraint, either by some sort of extra-grammatical constraint or by natural language in section 4.17.
In today's telcon, we agreed to add a rule to 4.17 - if a function is marked deterministic or nondeterministic, the function must be external; otherise, it is a static error.