/** * Verify the character at * @param source * @param offset * @return */ public String isValid (XMLSource source, int offset) { char c = source.charAt (offset); if (Character.isHighSurrogate (c)) { if (offset + 1 >= source.length ()) return "Unexpected end of input"; char c2 = source.charAt (offset + 1); if (Character.isLowSurrogate (c2)) return isValid (Character.toCodePoint (c, c2)); return "Character after first in surrogate pair is not between 0xDC00 and 0xDFFF: "+Integer.toHexString (c2); } return isValid (c); }
String msg = charValidator.isValid (value); if (msg == null) return value;
String msg = charValidator.isValid (source, pos); if (msg != null) throw new XMLParseException ("Illegal character found in processing instruction. "+msg, source, pos);
String msg = charValidator.isValid (source, pos); if (msg != null) throw new XMLParseException ("Illegal character found in CDATA. "+msg, source, pos);
String msg = charValidator.isValid (source, pos); if (msg != null) throw new XMLParseException ("Illegal character found in text. "+msg, source, pos);
String msg = getCharValidator ().isValid (source, pos); if (msg != null) throw new XMLParseException ("Illegal character found in quoted text. "+msg, source, pos);
String msg = charValidator.isValid (source, pos); if (msg != null) throw new XMLParseException ("Illegal character found in comment. "+msg, source, pos);
insideEntity = false; } else { String msg = charValidator.isValid(source, pos); if (msg != null) throw new XMLParseException("Illegal character found in attribute value. " + msg, source, pos);
String msg = charValidator.isValid (source, pos); if (msg != null) throw new XMLParseException ("Illegal character found in attribute value. "+msg, source, pos);
insideEntity = false; } else { String msg = charValidator.isValid(source, pos); if (msg != null) throw new XMLParseException("Illegal character found in attribute value. " + msg, source, pos);