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

Re: [FO] fn:substring arguments

From: Mukul Gandhi <gandhi.mukul@gmail.com>
Date: Sun, 23 Nov 2008 20:54:26 +0530
Message-ID: <7870f82e0811230724u5f390ae0t64751504b5ba7127@mail.gmail.com>
To: "Michael Kay" <mike@saxonica.com>
Cc: public-qt-comments@w3.org

Thanks, Mike for the answer and clarifying my doubt.

On Sun, Nov 23, 2008 at 7:25 PM, Michael Kay <mike@saxonica.com> wrote:
>> 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/



-- 
Regards,
Mukul Gandhi
Received on Sunday, 23 November 2008 15:31:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:25 UTC