W3C home > Mailing lists > Public > public-qt-comments@w3.org > December 2008

[Bug 6306] New: [FO] idref() invocation of normalize-space() is wrong

From: <bugzilla@wiggum.w3.org>
Date: Fri, 12 Dec 2008 15:41:41 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-6306-523@http.www.w3.org/Bugs/Public/>

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

           Summary: [FO] idref() invocation of normalize-space() is wrong
           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


The specification of fn:idref() (in 15.5.3) says:

A node $N has an IDREF value equal to V if both of the following conditions are
true:

    * The is-idrefs property (See Section 5.6 is-idrefs AccessorDM.)of $N is
true
    * The sequence fn:tokenize(fn:normalize-space($N), ' ') contains a string
that is equal to V ...

Now if $N is a node that has acquired the is-idrefs property by virtue of
having the schema type xs:IDREFS, then the call to normalize-space() will
implicitly atomize $N to produce a sequence of atomic values of type xs:IDREF;
and if there is more than one such atomic value, the call will fail with a type
error, because its signature expects an argument of type xs:string? (that is,
it does not accept a sequence of more than one string).

I think that what is intended is 

    fn:tokenize(fn:normalize-space(fn:string($N)), ' ')


-- 
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 Friday, 12 December 2008 15:41:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:38 UTC