static String checkPublicID(final String publicID) {
    String reason = null;

    if (publicID == null) return null;
    // This indicates there is no public ID

    for (int i = 0; i < publicID.length(); i++) {
      final char c = publicID.charAt(i);
      if (!isXMLPublicIDCharacter(c)) {
        reason = c + " is not a legal character in public IDs";
        break;
      }
    }

    return reason;
  }
static String checkPublicID(final String publicID)