xsl-list
[Top] [All Lists]

Re: [xsl] analyze-string help?

2012-06-10 05:30:51
On 10 June 2012 10:45, Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:


On 10/06/2012 07:46, Syd Bauman wrote:

I think this principle of always using the simplest regex that does the job
is a very good one. Remember, even if the regex works on all your test
cases, there's a good chance someone in a year's time is going to come back
to it and need to change it. Complex regexes are intrinsically very hard to
debug, so it's a good idea to avoid them if you can.

Then, a corollary of this argument would certainly be that the
simplest available
*technique* is a very good one. substring-before/after comes to my mind even
though this splits on the first occurrence. A fn:string-split would be
nice to have,
but it's easy to implement.

-W

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--