Author: knoaman Date: Mon May 30 19:31:20 2011 New Revision: 1129316 URL: http://svn.apache.org/viewvc?rev=1129316&view=rev Log: Fixing Jira bug XERCESJ-1514 (https://issues.apache.org/jira/browse/XERCESJ-1514).
Modified: xerces/java/trunk/src/org/apache/xerces/impl/xpath/regex/ParserForXMLSchema.java Modified: xerces/java/trunk/src/org/apache/xerces/impl/xpath/regex/ParserForXMLSchema.java URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xpath/regex/ParserForXMLSchema.java?rev=1129316&r1=1129315&r2=1129316&view=diff ============================================================================== --- xerces/java/trunk/src/org/apache/xerces/impl/xpath/regex/ParserForXMLSchema.java (original) +++ xerces/java/trunk/src/org/apache/xerces/impl/xpath/regex/ParserForXMLSchema.java Mon May 30 19:31:20 2011 @@ -249,7 +249,7 @@ class ParserForXMLSchema extends RegexPa if (c == ']') throw this.ex("parser.cc.7", this.offset-2); if (c == '-' && this.chardata != ']' && !firstloop) throw this.ex("parser.cc.8", this.offset-2); // if regex = '[-]' then invalid } - if (this.read() != T_CHAR || this.chardata != '-' || c == '-' && firstloop) { // Here is no '-'. + if (this.read() != T_CHAR || this.chardata != '-' || c == '-' && !wasDecoded && firstloop) { // Here is no '-'. if (!this.isSet(RegularExpression.IGNORE_CASE) || c > 0xffff) { tok.addRange(c, c); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org