protected WstxException throwInvalidSpace(int i, boolean deferErrors) throws WstxException { char c = (char) i; WstxException ex; if (c == CHAR_NULL) { ex = constructNullCharException(); } else { String msg = "Illegal character ("+getCharDesc(c)+")"; if (mXml11) { msg += " [note: in XML 1.1, it could be included via entity expansion]"; } ex = new WstxUnexpectedCharException(msg, getLastCharLocation(), c); } if (!deferErrors) { throw ex; } return ex; }
public WstxException throwWfcException(String msg, boolean deferErrors) throws WstxException { WstxException ex = constructWfcException(msg); if (!deferErrors) { throw ex; } return ex; }
if (!ensureInput(6)) { avail = inputInBuffer(); if (avail < 3) { throwUnexpectedEOF(SUFFIX_IN_ENTITY_REF); String id = parseEntityName(c); mCurrName = id; return findEntity(id, null);
EntityDecl ed = findEntity(id, extraArg); mCurrEntity = expandUnresolvedEntity(id); expandEntity(ed, allowExt);
protected void throwUnexpectedChar(int i, String msg) throws WstxException { char c = (char) i; String excMsg = "Unexpected character "+getCharDesc(c)+msg; throw new WstxUnexpectedCharException(excMsg, getLastCharLocation(), c); }
public void reportValidationProblem(String msg, int severity) throws XMLStreamException { reportValidationProblem(new XMLValidationProblem(getLastCharLocation(), msg, severity)); }
char[] outBuf = getNameBuffer(ptr+8); if (!loadMoreFromCurrent()) { break; if (c == ':') { // colon only allowed in non-NS mode if (mCfgNsEnabled) { throwNsColonException(new String(outBuf, 0, ptr) + c + parseFNameForError()); } else if (!isNameChar(c)) { break; mNameBuffer = outBuf = expandBy50Pct(outBuf); outLen = outBuf.length;
throws XMLStreamException char c = getNextCharFromCurrent(SUFFIX_IN_ENTITY_REF); int ch = resolveCharEnt(originalSurface); if (mCfgTreatCharRefsAsEntities) { final char[] originalChars = new char[originalSurface.length()]; originalSurface.getChars(0, originalSurface.length(), originalChars, 0); mCurrEntity = getIntEntity(ch, originalChars); return 0; String id = parseEntityName(c); final char[] originalChars = new char[id.length()]; id.getChars(0, id.length(), originalChars, 0); mCurrEntity = getIntEntity(d, originalChars); return 0; final EntityDecl e = expandEntity(id, allowExt, null); if (mCfgTreatCharRefsAsEntities) { mCurrEntity = e;
if (!ensureInput(6)) { avail = inputInBuffer(); if (avail < 3) { throwUnexpectedEOF(SUFFIX_IN_ENTITY_REF); return resolveCharEnt(null);
char[] outBuf = getNameBuffer(ptr+8); if (!loadMoreFromCurrent()) { break; break; if (!isNameChar(c)) { break; mNameBuffer = outBuf = expandBy50Pct(outBuf); outLen = outBuf.length;
throws XMLStreamException char[] buf = getNameBuffer(-1); int ptr = 0; mInputBuffer[mInputPtr++] : getNextChar(errorMsg); if (c == quoteChar) { break; markLF(); } else if (c == '\r') { if (peekNext() == '\n') { ++mInputPtr; if (!convertLFs) { buf = expandBy50Pct(buf); buf = expandBy50Pct(buf);
protected void throwNullChar() throws WstxException { throw constructNullCharException(); }
protected void throwUnexpectedEOF(String msg) throws WstxException { throw new WstxEOFException("Unexpected EOF" +(msg == null ? "" : msg), getLastCharLocation()); }
protected void _reportProblem(XMLReporter rep, String probType, String msg, Location loc) throws XMLStreamException { if (loc == null) { loc = getLastCharLocation(); } _reportProblem(rep, new XMLValidationProblem(loc, msg, XMLValidationProblem.SEVERITY_ERROR, probType)); }
char[] outBuf = getNameBuffer(ptr+8); if (!loadMoreFromCurrent()) { break; if (c == ':') { // colon only allowed in non-NS mode if (mCfgNsEnabled) { throwNsColonException(new String(outBuf, 0, ptr) + c + parseFNameForError()); } else if (!isNameChar(c)) { break; mNameBuffer = outBuf = expandBy50Pct(outBuf); outLen = outBuf.length;
throws IOException, XMLStreamException char c = getNextCharFromCurrent(SUFFIX_IN_ENTITY_REF); return resolveCharEnt(); String id = parseEntityName(c); expandEntity(id, allowExt, null); return CHAR_NULL;
if (!ensureInput(6)) { avail = inputInBuffer(); if (avail < 3) { throwUnexpectedEOF(SUFFIX_IN_ENTITY_REF); return resolveCharEnt(null);
char[] outBuf = getNameBuffer(ptr+8); if (!loadMoreFromCurrent()) { break; break; if (!isNameChar(c)) { break; mNameBuffer = outBuf = expandBy50Pct(outBuf); outLen = outBuf.length;
EntityDecl ed = findEntity(id, extraArg); expandUnresolvedEntity(id); expandEntity(ed, allowExt); return ed;
throws XMLStreamException char[] buf = getNameBuffer(-1); int ptr = 0; boolean spaceToAdd = false; mInputBuffer[mInputPtr++] : getNextChar(errorMsg); if (c == quoteChar) { break; markLF(); spaceToAdd = true; continue; } else if (c == '\r') { if (peekNext() == '\n') { ++mInputPtr; throwUnexpectedChar(c, " in public identifier"); buf = expandBy50Pct(buf); buf[ptr++] = CHAR_SPACE; if (ptr >= buf.length) { buf = expandBy50Pct(buf);