You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2007/08/31 16:01:59 UTC
svn commit: r571468 -
/xerces/java/trunk/src/org/apache/xerces/impl/xpath/regex/ParserForXMLSchema.java
Author: knoaman
Date: Fri Aug 31 07:01:58 2007
New Revision: 571468
URL: http://svn.apache.org/viewvc?rev=571468&view=rev
Log:
Fix for bug http://issues.apache.org/jira/browse/XERCESJ-1265. Thanks to Ed Merks.
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=571468&r1=571467&r2=571468&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 Fri Aug 31 07:01:58 2007
@@ -247,12 +247,9 @@
if (type == T_CHAR) {
if (c == '[') throw this.ex("parser.cc.6", this.offset-2);
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 (c == '-' && this.chardata != ']' && !firstloop) throw this.ex("parser.cc.8", this.offset-2); // if regex = '[-]' then invalid
}
- if(c == '-' && this.chardata == '-' && this.read() != T_BACKSOLIDUS && !wasDecoded) {
- throw this.ex("parser.cc.8", this.offset-2);
- }
- if (this.read() != T_CHAR || this.chardata != '-') { // Here is no '-'.
+ if (this.read() != T_CHAR || this.chardata != '-' || c == '-' && firstloop) { // Here is no '-'.
tok.addRange(c, c);
} else { // Found '-'
// Is this '-' is a from-to token??
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org