W3C home > Mailing lists > Public > www-xpath-comments@w3.org > January to March 2001

substring-before and substring-after

From: Adam Van Den Hoven <Adam.Hoven@bluezone.net>
Date: Mon, 5 Mar 2001 10:17:06 -0800
Message-ID: <00BB1956AE40D411B5B60050DA27311F3C60DC@MAIL>
To: "'www-xpath-comments@w3.org'" <www-xpath-comments@w3.org>
I was looking at these two functions and I have a question about the
implementation of this. Specifically I'm wondering why you chose to make
both return an empty string if the substring string does not occure within
the main string. It seems to me to make more sense for substring-before to
return the main string if the substring does not occur within the main
string. That is the following should always be true:
<<Some String>> = concat(substring-before(<<Some String>>, <<Some
Substring>>) , <<Some Substring>>, substring-after(<<Some String>>, <<Some

Additionally, it would be nice to have an indexof function so that the
substring function can have some intelligent meaning.

> Adam van den Hoven
> Internet Application Developer
> Blue Zone
> tel. 604.685.4310
> fax. 604.685.4391
> Blue Zone makes you interactive.(tm) http://www.bluezone.net/
Received on Monday, 5 March 2001 13:26:35 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:02:14 UTC