[Bug 4974] [F&O] Clarify error condition in fn:normalize-space()

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





------- Comment #1 from mike@saxonica.com  2007-09-25 14:55 -------
The proposed revision isn't quite right, because the implicit argument is not
"." but "string(.)". (I'm not really sure why: but that's the way it is, and
they aren't quite the same.)

I don't think we need to say that "if the argument is the context item and the
context item is undefined then XPDY0002 is raised". This means you have written
normalize-space(.), and in this case normalize-space() gets no say in the
matter because the error has already occurred while evaluating the argument,
".", under XPath section 3.1.4. So (avoiding the temptation to make more
extensive changes) I think we should change the relevant paragraph to read:

<new>
If no argument is supplied, then $arg defaults to the string value (calculated
using fn:string()) of the context item (.). If no argument is supplied and the
context item is undefined then an error is raised: [err:XPDY0002]XP.
</new>

Received on Tuesday, 25 September 2007 14:55:24 UTC