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

fn:substring: explanation of negative or zero $startingLoc behaviour

From: Howard Katz <howardk@fatdog.com>
Date: Fri, 12 Mar 2004 10:08:24 -0800
To: <public-qt-comments@w3.org>
Message-ID: <IKEOLCDFPBBPPAHGNKKOMEPPEHAA.howardk@fatdog.com>

F and O: 7.4.3 fn:substring()

The explanation of $startingLoc in 7.4.3 reads, "If $startingLoc is zero or
negative, the substring includes characters from the beginning of the
$sourceString." I find the meaning of the phrase "from the beginning of the
$sourceString" to be unclear and can't find any other reference to the
concept of negative character positions within a string.

Out-of-band communication on the www-ql list seems to indicate that the
concept of "imaginary character positions" preceding the physical start of
the string might be a useful way of explaining zero or negative $startingLoc
behaviour. I'd suggest the addition of this or a similar explanation to
7.4.3.

Howard
Received on Friday, 12 March 2004 13:07:56 UTC

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