xsl-list
[Top] [All Lists]

RE: [xsl] Move leading/trailing spaces outside (XSLT 2.0)

2007-02-06 08:26:17

<xsl:template match="e">
  <xsl:analyze-string select="." regex="^\s*.*?\s*$">

I think that needs to be
    <xsl:analyze-string select="." regex="^(\s*)(.+?)(\s*)$"> 
as the posted regular expression lacks parentheses to allow 
the later use of regex-group and as the posted regular 
expression matches the empty string which is not allowed.

Quite right, thanks.

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
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>
--~--