diff --git a/src/org/apache/xerces/dom/CoreDocumentImpl.java b/src/org/apache/xerces/dom/CoreDocumentImpl.java index 06465208df..2980b798fd 100644 --- a/src/org/apache/xerces/dom/CoreDocumentImpl.java +++ b/src/org/apache/xerces/dom/CoreDocumentImpl.java @@ -2211,15 +2211,15 @@ public Object clone() throws CloneNotSupportedException { * utility class */ - public static final boolean isXMLName(String s, boolean xml11Version) { + public static final boolean isXMLName(String name, boolean xml11Version) { - if (s == null) { + if (name == null) { return false; } if(!xml11Version) - return XMLChar.isValidName(s); + return XMLChar.isValidName(name); else - return XML11Char.isXML11ValidName(s); + return XML11Char.isXML11ValidName(name); } // isXMLName(String):boolean diff --git a/src/org/apache/xerces/impl/xpath/regex/REUtil.java b/src/org/apache/xerces/impl/xpath/regex/REUtil.java index 2c547323c6..0465e986a4 100644 --- a/src/org/apache/xerces/impl/xpath/regex/REUtil.java +++ b/src/org/apache/xerces/impl/xpath/regex/REUtil.java @@ -281,7 +281,7 @@ else if (target == null) * * @see RegularExpression#RegularExpression(java.lang.String, java.lang.String) */ - public static RegularExpression createRegex(String pattern, String options) + public static RegularExpression createRegex(String regex, String options) throws ParseException { RegularExpression re = null; int intOptions = REUtil.parseOptions(options); @@ -293,7 +293,7 @@ public static RegularExpression createRegex(String pattern, String options) i = -1; break; } - if (cached.equals(pattern, intOptions)) { + if (cached.equals(regex, intOptions)) { re = cached; break; } @@ -304,7 +304,7 @@ public static RegularExpression createRegex(String pattern, String options) REUtil.regexCache[0] = re; } } else { - re = new RegularExpression(pattern, options); + re = new RegularExpression(regex, options); System.arraycopy(REUtil.regexCache, 0, REUtil.regexCache, 1, REUtil.CACHESIZE-1); REUtil.regexCache[0] = re; } diff --git a/src/org/apache/xerces/impl/xpath/regex/RegexParser.java b/src/org/apache/xerces/impl/xpath/regex/RegexParser.java index 2da0e14c4b..45085f8147 100644 --- a/src/org/apache/xerces/impl/xpath/regex/RegexParser.java +++ b/src/org/apache/xerces/impl/xpath/regex/RegexParser.java @@ -58,10 +58,10 @@ class RegexParser { static class ReferencePosition { int refNumber; - int position; - ReferencePosition(int n, int pos) { + int offset; + ReferencePosition(int n, int offset) { this.refNumber = n; - this.position = pos; + this.offset = offset; } } @@ -135,7 +135,7 @@ synchronized Token parse(String regex, int options) throws ParseException { for (int i = 0; i < this.references.size(); i ++) { ReferencePosition position = (ReferencePosition)this.references.elementAt(i); if (this.parennumber <= position.refNumber) - throw ex("parser.parse.2", position.position); + throw ex("parser.parse.2", position.offset); } this.references.removeAllElements(); } diff --git a/src/org/apache/xerces/impl/xpath/regex/RegularExpression.java b/src/org/apache/xerces/impl/xpath/regex/RegularExpression.java index f92cb3b964..0cbaa4954c 100644 --- a/src/org/apache/xerces/impl/xpath/regex/RegularExpression.java +++ b/src/org/apache/xerces/impl/xpath/regex/RegularExpression.java @@ -1525,21 +1525,21 @@ boolean matchAnchor(ExpressionTarget target, Op op, Context con, int offset, int return false; break; } // switch anchor type - + return true; } - private static final int getPreviousWordType(ExpressionTarget target, int begin, int end, + private static final int getPreviousWordType(ExpressionTarget target, int start, int end, int offset, int opts) { - int ret = getWordType(target, begin, end, --offset, opts); + int ret = getWordType(target, start, end, --offset, opts); while (ret == WT_IGNORE) - ret = getWordType(target, begin, end, --offset, opts); + ret = getWordType(target, start, end, --offset, opts); return ret; } - private static final int getWordType(ExpressionTarget target, int begin, int end, + private static final int getWordType(ExpressionTarget target, int start, int end, int offset, int opts) { - if (offset < begin || offset >= end) return WT_OTHER; + if (offset < start || offset >= end) return WT_OTHER; return getWordType0(target.charAt(offset) , opts); } diff --git a/src/org/apache/xerces/impl/xs/traversers/SchemaContentHandler.java b/src/org/apache/xerces/impl/xs/traversers/SchemaContentHandler.java index 4ef9b962f7..acf54c2080 100644 --- a/src/org/apache/xerces/impl/xs/traversers/SchemaContentHandler.java +++ b/src/org/apache/xerces/impl/xs/traversers/SchemaContentHandler.java @@ -258,18 +258,18 @@ public void processingInstruction(String target, String data) throws SAXExceptio convertToSAXException(e); } } - - /* + + /* * @see org.xml.sax.ContentHandler#skippedEntity(java.lang.String) */ - public void skippedEntity(String arg) throws SAXException { + public void skippedEntity(String name) throws SAXException { // do-nothing } - + /* * Other methods */ - + private void fillQName(QName toFill, String uri, String localpart, String rawname) { if (!fStringsInternalized) { uri = (uri != null && uri.length() > 0) ? fSymbolTable.addSymbol(uri) : null;