Actions
Bug #5637
closedMore detailed message for regular expression error
Start date:
2022-08-08
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
11, trunk
Fix Committed on Branch:
11, trunk
Description
If validate the following XSL with Saxon 11.4 I get an error message:
"Error in regular expression: Incorrect syntax for Java regular expression".
I expect to have also the reason of the regexp error in the message. Something like this:
"Error in regular expression: Incorrect syntax for Java regular expression: Unclosed group near index 7 ((.+)"
Maybe you can modify the " throw XPathException" from JavaRegularExpression class something like this:
throw new XPathException("Incorrect syntax for Java regular expression: " + e.getMessage(), e);
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">
<xsl:template match="/">
<xsl:analyze-string select="." regex=" ((\.+)" flags=";j">
<xsl:matching-substring/>
</xsl:analyze-string>
</xsl:template>
</xsl:stylesheet>
Please register to edit this issue
Actions