#588 regex-group() returns empty sequence

v8.8
closed
5
2012-10-08
2006-09-18
Michael Kay
No

The XSLT regex-group() function returns the empty
sequence () when there is no current regular expression
match, for example when called during execution of
xsl:non-matching-substring. It should return a
zero-length string.

The patch in Subversion is in two parts. A change to
net.sf.saxon.functions.StandardFunctions changes the
type signature to disallow the empty sequence as a
return value, and a change to
net.sf.saxon.functions.RegexGroup changes those cases
that return () to return "" instead.

Discussion