[Bug 6338] New: [FO] fn:string-length() ambiguous sentence

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

           Summary: [FO] fn:string-length() ambiguous sentence
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators
        AssignedTo: mike@saxonica.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


Section 7.4.4 contains the sentence (braces inserted to indicate the intended
reading)

{If no argument is supplied or if the argument is the context item} and the
context item is undefined an error is raised: [err:XPDY0002]XP.

which can easily be misread as:

If no argument is supplied or {if the argument is the context item and the
context item is undefined} an error is raised: [err:XPDY0002]XP.

The same problem also occurs for fn:normalize-space().

Possible alternative wording:

If no argument is supplied or the argument is the context item then an error is
raised if the context item is undefined: [err:XPDY0002]XP.

However, the same error is raised if the argument is any other expression whose
value depends on the context item, for example @att; the error here is nothing
specific to this function. So I would suggest changing the paragraph in which
the sentence occurs to:

If no argument is supplied, $arg defaults to the string value of the context
item (that is, the value of the expression string(.)). If the context item is
undefined this will result in an error: [err:XPDY0002]XP.


-- 
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.

Received on Wednesday, 31 December 2008 17:23:29 UTC