Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[XERCESJ-1715] Patch: Made some variable names more consistent with the other parts. #17

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/org/apache/xerces/dom/CoreDocumentImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions src/org/apache/xerces/impl/xpath/regex/REUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions src/org/apache/xerces/impl/xpath/regex/RegexParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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();
}
Expand Down
12 changes: 6 additions & 6 deletions src/org/apache/xerces/impl/xpath/regex/RegularExpression.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down