http://www.w3.org/Bugs/Public/show_bug.cgi?id=7863 Summary: [XQuery 1.1] BNF of FunctionDecl allows user-defined
functions to be nondeterministic
Product: XPath / XQuery / XSLT
Version: Working drafts
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: XQuery 1.1
AssignedTo:
jonathan.robie@...
ReportedBy:
jim.melton@...
QAContact:
public-qt-comments@...
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.
--
Configure bugmail:
http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email------- You are receiving this mail because: -------
You are the QA contact for the bug.