This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The error XPDY0002 which occurs when the context item is absent is generally described in the XPath spec as a dynamic error but in the F+O spec as a type error.
For reference: err:XPDY0002 It is a dynamic error if evaluation of an expression relies on some part of the dynamic context that is absentDM30 .
I propose that we keep this as a dynamic error, and modify the following text: <quote> if an implementation can determine during the static analysis phase that a QueryBody <add>or FunctionBody</add>, if evaluated, would necessarily raise a dynamic error or that an expression, if evaluated, would necessarily raise a type error, the implementation may (but is not required to) report that error during the static analysis phase. <add>However, a FunctionBody should not raise such error statically simply because invoking the function would invoke fn:error().</quote>
I believe the status quo is that it is a dynamic error. I think our choices are: * Keep the status quo, make consistent in F&O * Change to a type error * Keep the status quo, make consistent in F&O, and allow dynamic errors to be raised statically in a function body.
The Working Groups have decided XPDY0002 is a dynamic error, and F&O will be changed to reflect that. We will not make the change proposed in Comment #2 during CR because it is too large a change at this stage of our progression.
Test cases try-016 and try-017 added.