[Bug 3675] fn:error(..) as an argument to another function/operator

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3675





------- Comment #1 from davidc@nag.co.uk  2006-09-08 10:43 -------
Surely though in this case if change is needed it would be a spec clarifcation
(that a function typed as none can be used anywhere) otherwise you would never
be able to raise an error message to the user with  error() on a system doing
the static type checks. It's not possible to declare a function that excepts a
type of none, so by the reasoning here there is nowhere that error() can be
used which would not generate a static type error, so the runtime error
specified in the arguments to error() could never be generated.

I read the note in F&O

 Note that "none" is a special type defined in [XQuery 1.0 and XPath 2.0 Formal
  Semantics] and is not available to the user. It indicates that the function
never returns and ensures that it has the correct static type.


as meaning that any particular call to error() has whatever static type is
needed at that point, so never raises a static type error.

David (Not a Working Group member)

Received on Friday, 8 September 2006 10:43:20 UTC