Re: [FO] fn:substring arguments

I saw in the F&O spec, that fn:string-length() function returns value
of type xs:integer.

I think that string-length is semantically equivalent to $startingLoc
(as mentioned in my previous post below). I mean that $startingLoc is
always <= string-length.

Shouldn't it then be appropriate to make $startingLoc as xs:integer
(for the fn:substring function)?

On Sun, Nov 23, 2008 at 2:43 PM, Mukul Gandhi <gandhi.mukul@gmail.com> wrote:
> Hello,
>   The F&O spec defines the fn:substring function as,
>
> fn:substring($sourceString  as xs:string?,
>                  $startingLoc  as xs:double) as xs:string
>
> In the above method signature, the 2nd argument is a xs:double.
>
> Whereas in Java language, substring function of the String library
> accepts an "int" argument.
>
> What is the motivation for the F&O spec to define the startingLoc
> argument as, xs:double and not an integer?



-- 
Regards,
Mukul Gandhi

Received on Sunday, 23 November 2008 11:38:30 UTC