W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2004

[XPath 2.0] XPath 1.0 compatibility mode and numeric arguments

From: Priscilla Walmsley <priscilla@walmsley.com>
Date: Wed, 4 Feb 2004 07:43:33 -0500
To: <public-qt-comments@w3.org>
Message-Id: <20040204124337.B1A0A880223@egp.w3.org>

In Section 3.1.5, it says:

"2. If the expected type is a numeric type, then the given value V is
effectively replaced by fn:number(V[1])."

This should apply only when it is expecting up to one numeric value.  If it
is expecting a sequence of (possibly several) numeric values, you wouldn't
want it to use just the first one.  

For example, the expected type of the codepoints-to-string argument is
xs:integer*. codepoints-to-string( (97, 98, 99) ) should return "abc", not
just "a", regardless of XPath 1.0 compatibility mode.

I realize that codepoints-to-string is not part of XPath 1.0, but it still
seems that you wouldn't want its behavior to change because of XPath 1.0
compatibility mode. 

Thanks,
Priscilla Walmsley
Received on Wednesday, 4 February 2004 07:43:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:13:57 UTC