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

RE: [FO] fn:substring arguments

From: Michael Kay <mike@saxonica.com>
Date: Sun, 23 Nov 2008 13:55:46 -0000
To: "'Mukul Gandhi'" <gandhi.mukul@gmail.com>, <public-qt-comments@w3.org>
Message-ID: <664CE12BDAB84B55BE8C582C5E99A46C@Sealion>

> What is the motivation for the F&O spec to define the 
> startingLoc argument as, xs:double and not an integer?

Primarily backwards compatibility: XPath 1.0 only had one numeric data type,
which was equivalent to xs:double in XPath 2.0. If it had been defined as
xs:integer, then valid XPath 1.0 expressions such as

substring($s, 1, (string-length($s) div 2))

would have been rejected as errors in XPath 2.0.

Michael Kay
http://www.saxonica.com/
Received on Sunday, 23 November 2008 13:56:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 23 November 2008 13:56:35 GMT