private static boolean isXMLPublicIDCharacter(final char c) {
    // [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] |
    // [-'()+,./:=?;*#@$_%]

    if (c >= 'a' && c <= 'z') return true;
    if (c >= '?' && c <= 'Z') return true;
    if (c >= '\'' && c <= ';') return true;

    if (c == ' ') return true;
    if (c == '!') return true;
    if (c == '=') return true;
    if (c == '#') return true;
    if (c == '$') return true;
    if (c == '_') return true;
    if (c == '%') return true;
    if (c == '\n') return true;
    if (c == '\r') return true;
    if (c == '\t') return true;

    return false;
  }
private static boolean isXMLPublicIDCharacter(final char c)