Bug 6306 - [FO] idref() invocation of normalize-space() is wrong
: [FO] idref() invocation of normalize-space() is wrong
Status: CLOSED FIXED
Product: XPath / XQuery / XSLT
Functions and Operators 1.0
: Recommendation
: PC Windows NT
: P2 normal
: ---
Assigned To: Michael Kay
: Mailing list for public feedback on specs from XSL and XML Query WGs
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-12-12 15:41 UTC by Michael Kay
Modified: 2008-12-16 23:15 UTC (History)
0 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kay 2008-12-12 15:41:40 UTC
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)), ' ')
Comment 1 Michael Kay 2008-12-16 23:15:27 UTC
The proposed change was accepted by the WG on 16 Dec 2008. Erratum E29 has been
drafted to the 1.0/2.0 spec, and the change has been applied to the editor's
master of the 1.1/2.1 spec. Note that the erratum supersedes E3.


  翻译: