Simple suggestion for XSLT

I don't know if it is worth a dime, but here it is:

6.2.5 Strings

The functions substring-before() and substring-after() only work with the
FIRST occurrence of the first argument, wouldn't it be interesting to have
a symmetrical couple of functions working on the LAST occurrence.
Something like

reverse-substring-before()
Returns the substring of the first argument that precedes the LAST
occurrence ...
ex: reverse-substring-before("1999/04/01", "/") returns "1999/04"

and

reverse-substring-after()
Returns the substring of the first argument that follows the LAST
occurrence ...
ex: reverse-substring-before("1999/04/01", "/") returns "01"

I understand the functionality could be implemented using extension
functions, but a 'native' version would be available across all XSLT
implementations.

What about also accessing the "04" (in "1999/04/01") ?

Apologies if someone already made the same suggestion (I found no evidence
of it the xsl-editors list).

A good day to everyone, and a big kudos for the great work.

Received on Saturday, 8 May 1999 18:56:26 UTC