W3C home > Mailing lists > Public > public-qt-comments@w3.org > August 2003

RE: [xslt2 func/op] tokenizing "abba" to ("a","b","b","a")

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Tue, 19 Aug 2003 12:58:51 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E62106073DD088@daemsg02.software-ag.de>
To: David Carlisle <davidc@nag.co.uk>, tobiasreif@pinkjuice.com
Cc: public-qt-comments@w3.org, ashokma@microsoft.com
> The sentence 
> > If the supplied $pattern matches a zero length string...
> should anyway (as this thread shows) be clarified, but as it 
> stands I think the natural interpretation of "matches" here 
> is the interprestation of matches used in replace(), and in 
> this case that is a greedy match as .? is greedy, so since it 
> is the entire regexp it is equivalent to . and will match 
> each character. While .? _could_ match an empty string, it 
> doesn't here so the empty string should not be used as separator.

That's a good point. The intended meaning of the sentence was

if (fn:matches("", $pattern))

but you are right to point out that a different interpretation is possible.

Michael Kay
Received on Tuesday, 19 August 2003 06:59:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:49 UTC