Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Jena 2.12.1
-
None
-
Linux
Description
E_Regex eval verifies the argument is a string using:
Node arg = NodeFunctions.checkAndGetStringLiteral("REGEX", args.get(0)) ;
NodeFunctions.checkAndGetStringLiteral verifies that if the nodevalue is not null and is an XSDstring by the following statement:
if ( dt != null && !dt.equals(XSDDatatype.XSDstring) ) throw new ExprEvalException(label + ": Not a string literal: " + nv) ;
this means that other string types (e.g. XSDnormalizedString) fail.
I believe that the check should be to check that dt is an instanceof XSDBaseStringType.
I am looking for comment before making the change.