private void handleIncluded() throws XMLStreamException { char c = skipDtdWs(false); if (c != '[') { throwDTDUnexpectedChar(c, "; expected '[' to follow 'INCLUDE' directive"); } ++mIncludeCount; }
private String readDTDLocalName(char c, boolean checkChar) throws XMLStreamException { /* Let's just check this first, to get better error msg * (parseLocalName() will double-check it too) */ if (checkChar && !isNameStartChar(c)) { throwDTDUnexpectedChar(c, "; expected an identifier"); } return parseLocalName(c); }
private String readDTDName(char c) throws XMLStreamException { // Let's just check this before trying to parse the id... if (!isNameStartChar(c)) { throwDTDUnexpectedChar(c, "; expected an identifier"); } return parseFullName(c); }
throwDTDUnexpectedChar(c, "; expected '!' to start a directive"); c = dtdNextFromCurr(); if (c != '-') { throwDTDUnexpectedChar(c, "; expected '-' for a comment"); handleDeclaration(c); } else { throwDTDUnexpectedChar(c, ErrorConsts.ERR_DTD_MAINLEVEL_KEYWORD);
throwDTDUnexpectedChar(c, "; expected a NMTOKEN character to start a NMTOKEN");
/** * @return True, if input contains 'PUBLIC' keyword; false if it * contains 'SYSTEM'; otherwise throws an exception. */ private boolean checkPublicSystemKeyword(char c) throws XMLStreamException { String errId; if (c == 'P') { errId = checkDTDKeyword("UBLIC"); if (errId == null) { return true; } errId = "P" + errId; } else if (c == 'S') { errId = checkDTDKeyword("YSTEM"); if (errId == null) { return false; } errId = "S" + errId; } else { if (!isNameStartChar(c)) { throwDTDUnexpectedChar(c, "; expected 'PUBLIC' or 'SYSTEM' keyword"); } errId = readDTDKeyword(String.valueOf(c)); } _reportWFCViolation("Unrecognized keyword '"+errId+"'; expected 'PUBLIC' or 'SYSTEM'"); return false; // never gets here }
_reportWFCViolation("Missing namespace URI for TARGETNS directive"); throwDTDUnexpectedChar(c, "; expected a single or double quote to enclose the namespace URI"); throwDTDUnexpectedChar(c, "; expected '>' to end TARGETNS directive");
throwDTDUnexpectedChar(c, " (empty list; missing identifier(s))?"); throwDTDUnexpectedChar(c, "; missing '|' separator?");
c = skipDtdWs(true); } else if (c == ',') { throwDTDUnexpectedChar(c, " (sequences not allowed within mixed content)"); } else if (c == '(') { throwDTDUnexpectedChar(c, " (sub-content specs not allowed within mixed content)"); } else { throwDTDUnexpectedChar(c, "; expected either '|' to separate elements, or ')' to close the list");
throwDTDUnexpectedChar(c, " (missing separator '|' or ','?)"); throwDTDUnexpectedChar(c, " (missing element name?)");
throwDTDUnexpectedChar(c, "; expected a quote to start the public identifier"); } else { if (!isPublic) { throwDTDUnexpectedChar(c, "; expected a quote to start the system identifier"); throwDTDUnexpectedChar(c, "; expected closing '>' after NOTATION declaration");
throwDTDUnexpectedChar(c, "; expected ']]>' to close conditional include section"); } finally { if (suppress) { throwDTDUnexpectedChar(i, "; expected a '<' to start a directive"); throwDTDUnexpectedChar(i, "; expected a '<' to start a directive, or \"]>\" to end internal subset");
c = skipObligatoryDtdWs(); if (c != '"' && c != '\'') { throwDTDUnexpectedChar(c, "; expected a quote to start the public identifier"); throwDTDUnexpectedChar(c, "; expected a quote to start the system identifier"); c = (char) i; if (!isSpaceChar(c)) { throwDTDUnexpectedChar(c, "; expected a separating space or closing '>'"); throwDTDUnexpectedChar(c, "; expected either NDATA keyword, or closing '>'"); throwDTDUnexpectedChar(c, "; expected closing '>'");
} while (false); } else { throwDTDUnexpectedChar(c, ": excepted '(' to start content specification for element <"+elemName+">"); throwDTDUnexpectedChar(c, "; expected '>' to finish the element declaration for <"+elemName+">");
throwDTDUnexpectedChar(c, "; expected a separating white space");
throwDTDUnexpectedChar(c, "; expected '[' to follow 'IGNORE' directive");
throwDTDUnexpectedChar(c, "; expected entity name after '&'"); throwDTDUnexpectedChar(c, "; expected semi-colon after entity name"); throwDTDUnexpectedChar(c, "; expected closing '>' after ENTITY declaration");
throwDTDUnexpectedChar(c, ErrorConsts.ERR_DTD_MAINLEVEL_KEYWORD); c = dtdNextFromCurr(); if (c != '-') { throwDTDUnexpectedChar(c, "; expected '-' for a comment"); handleDeclaration(c); } else { throwDTDUnexpectedChar(c, ErrorConsts.ERR_DTD_MAINLEVEL_KEYWORD);
throwDTDUnexpectedChar(c, "; expected ';' to end parameter entity name");
throwDTDUnexpectedChar(quoteChar, msg); throwDTDUnexpectedChar(c, SUFFIX_IN_DEF_ATTR_VALUE);