Methods Summary |
---|
protected java.lang.String | getVersionNotSupportedKey()
return "VersionNotSupported11";
|
protected boolean | isInvalid(int value)
return (!XML11Char.isXML11Valid(value));
|
protected boolean | isInvalidLiteral(int value)
return (!XML11Char.isXML11ValidLiteral(value));
|
protected int | isUnchangedByNormalization(com.sun.org.apache.xerces.internal.xni.XMLString value)Checks whether this string would be unchanged by normalization.
int end = value.offset + value.length;
for (int i = value.offset; i < end; ++i) {
int c = value.ch[i];
if (XMLChar.isSpace(c)) {
return i - value.offset;
}
}
return -1;
|
protected boolean | isValidNCName(int value)
return (XML11Char.isXML11NCName(value));
|
protected boolean | isValidNameChar(int value)
return (XML11Char.isXML11Name(value));
|
protected boolean | isValidNameStartChar(int value)
return (XML11Char.isXML11NameStart(value));
|
protected boolean | isValidNameStartHighSurrogate(int value)
return XML11Char.isXML11NameHighSurrogate(value);
|
protected void | normalizeWhitespace(com.sun.org.apache.xerces.internal.xni.XMLString value)Normalize whitespace in an XMLString converting all whitespace
characters to space characters.
int end = value.offset + value.length;
for (int i = value.offset; i < end; ++i) {
int c = value.ch[i];
if (XMLChar.isSpace(c)) {
value.ch[i] = ' ";
}
}
|
protected void | normalizeWhitespace(com.sun.org.apache.xerces.internal.xni.XMLString value, int fromIndex)Normalize whitespace in an XMLString converting all whitespace
characters to space characters.
int end = value.offset + value.length;
for (int i = value.offset + fromIndex; i < end; ++i) {
int c = value.ch[i];
if (XMLChar.isSpace(c)) {
value.ch[i] = ' ";
}
}
|
protected boolean | scanPubidLiteral(com.sun.org.apache.xerces.internal.xni.XMLString literal)Scans public ID literal.
[12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"
[13] PubidChar::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
The returned string is normalized according to the following rule,
from http://www.w3.org/TR/REC-xml#dt-pubid:
Before a match is attempted, all strings of white space in the public
identifier must be normalized to single space characters (#x20), and
leading and trailing white space must be removed.
int quote = fEntityScanner.scanChar();
if (quote != '\'" && quote != '"") {
reportFatalError("QuoteRequiredInPublicID", null);
return false;
}
fStringBuffer.clear();
// skip leading whitespace
boolean skipSpace = true;
boolean dataok = true;
while (true) {
int c = fEntityScanner.scanChar();
// REVISIT: it could really only be \n or 0x20; all else is normalized, no? - neilg
if (c == ' " || c == '\n" || c == '\r" || c == 0x85 || c == 0x2028) {
if (!skipSpace) {
// take the first whitespace as a space and skip the others
fStringBuffer.append(' ");
skipSpace = true;
}
}
else if (c == quote) {
if (skipSpace) {
// if we finished on a space let's trim it
fStringBuffer.length--;
}
literal.setValues(fStringBuffer);
break;
}
else if (XMLChar.isPubid(c)) {
fStringBuffer.append((char)c);
skipSpace = false;
}
else if (c == -1) {
reportFatalError("PublicIDUnterminated", null);
return false;
}
else {
dataok = false;
reportFatalError("InvalidCharInPublicID",
new Object[]{Integer.toHexString(c)});
}
}
return dataok;
|
protected boolean | versionSupported(java.lang.String version)
return version.equals("1.1") || version.equals ("1.0");
|