protected final void verifyWriteCData() throws XMLStreamException { // Not legal outside main element tree: if (mCheckStructure) { if (inPrologOrEpilog()) { reportNwfStructure(ErrorConsts.WERR_PROLOG_CDATA); } } // 08-Dec-2005, TSa: validator-based validation? if (mVldContent <= XMLValidator.CONTENT_ALLOW_WS) { // there's no ignorable white space CDATA... reportInvalidContent(CDATA); } }
public void writeProcessingInstruction(String target, String data) throws XMLStreamException { mAnyOutput = true; // Need to finish an open start element? if (mStartElementOpen) { closeStartElement(mEmptyElement); } // Structurally, PIs are always ok (content might not be) // 08-Dec-2005, TSa: validator-based validation? if (mVldContent == XMLValidator.CONTENT_ALLOW_NONE) { reportInvalidContent(PROCESSING_INSTRUCTION); } int ix; try { ix = mWriter.writePI(target, data); } catch (IOException ioe) { throw new WstxIOException(ioe); } if (ix >= 0) { throw new XMLStreamException("Illegal input: processing instruction content has embedded '?>' in it (index "+ix+")"); } }
reportInvalidContent(CHARACTERS); } else { // all-ws is ok... if (!ch.isIgnorableWhiteSpace() && !ch.isWhiteSpace()) { reportInvalidContent(CHARACTERS);
public void writeComment(String data) throws XMLStreamException { mAnyOutput = true; // Need to finish an open start element? if (mStartElementOpen) { closeStartElement(mEmptyElement); } // 08-Dec-2005, TSa: validator-based validation? if (mVldContent == XMLValidator.CONTENT_ALLOW_NONE) { reportInvalidContent(COMMENT); } /* No structural validation needed per se, for comments; they are * allowed anywhere in XML content. However, content may need to * be checked (by XmlWriter) */ int ix; try { ix = mWriter.writeComment(data); } catch (IOException ioe) { throw new WstxIOException(ioe); } if (ix >= 0) { reportNwfContent(ErrorConsts.WERR_COMMENT_CONTENT, DataUtil.Integer(ix)); } }
reportInvalidContent(ENTITY_REFERENCE);
reportInvalidContent(CHARACTERS); } else { // all-ws is ok... if (!StringUtil.isAllWhitespace(text, start, len)) { reportInvalidContent(CHARACTERS);
reportInvalidContent(CHARACTERS); } else { // all-ws is ok... if (!StringUtil.isAllWhitespace(text)) { reportInvalidContent(CHARACTERS);
protected final void verifyWriteCData() throws XMLStreamException { // Not legal outside main element tree: if (mCheckStructure) { if (inPrologOrEpilog()) { reportNwfStructure(ErrorConsts.WERR_PROLOG_CDATA); } } // 08-Dec-2005, TSa: validator-based validation? if (mVldContent <= XMLValidator.CONTENT_ALLOW_WS) { // there's no ignorable white space CDATA... reportInvalidContent(CDATA); } }
protected final void verifyWriteCData() throws XMLStreamException { // Not legal outside main element tree: if (mCheckStructure) { if (inPrologOrEpilog()) { reportNwfStructure(ErrorConsts.WERR_PROLOG_CDATA); } } // 08-Dec-2005, TSa: validator-based validation? if (mVldContent <= XMLValidator.CONTENT_ALLOW_WS) { // there's no ignorable white space CDATA... reportInvalidContent(CDATA); } }
protected final void verifyWriteCData() throws XMLStreamException { // Not legal outside main element tree: if (mCheckStructure) { if (inPrologOrEpilog()) { reportNwfStructure(ErrorConsts.WERR_PROLOG_CDATA); } } // 08-Dec-2005, TSa: validator-based validation? if (mVldContent <= XMLValidator.CONTENT_ALLOW_WS) { // there's no ignorable white space CDATA... reportInvalidContent(CDATA); } }
protected final void verifyWriteCData() throws XMLStreamException { // Not legal outside main element tree: if (mCheckStructure) { if (inPrologOrEpilog()) { reportNwfStructure(ErrorConsts.WERR_PROLOG_CDATA); } } // 08-Dec-2005, TSa: validator-based validation? if (mVldContent <= XMLValidator.CONTENT_ALLOW_WS) { // there's no ignorable white space CDATA... reportInvalidContent(CDATA); } }
protected final void verifyWriteCData() throws XMLStreamException { // Not legal outside main element tree: if (mCheckStructure) { if (inPrologOrEpilog()) { reportNwfStructure(ErrorConsts.WERR_PROLOG_CDATA); } } // 08-Dec-2005, TSa: validator-based validation? if (mVldContent <= XMLValidator.CONTENT_ALLOW_WS) { // there's no ignorable white space CDATA... reportInvalidContent(CDATA); } }
protected final void verifyWriteCData() throws XMLStreamException { // Not legal outside main element tree: if (mCheckStructure) { if (inPrologOrEpilog()) { reportNwfStructure(ErrorConsts.WERR_PROLOG_CDATA); } } // 08-Dec-2005, TSa: validator-based validation? if (mVldContent <= XMLValidator.CONTENT_ALLOW_WS) { // there's no ignorable white space CDATA... reportInvalidContent(CDATA); } }
protected final void verifyWriteCData() throws XMLStreamException { // Not legal outside main element tree: if (mCheckStructure) { if (inPrologOrEpilog()) { reportNwfStructure(ErrorConsts.WERR_PROLOG_CDATA); } } // 08-Dec-2005, TSa: validator-based validation? if (mVldContent <= XMLValidator.CONTENT_ALLOW_WS) { // there's no ignorable white space CDATA... reportInvalidContent(CDATA); } }
public void writeProcessingInstruction(String target, String data) throws XMLStreamException { mAnyOutput = true; // Need to finish an open start element? if (mStartElementOpen) { closeStartElement(mEmptyElement); } // Structurally, PIs are always ok (content might not be) // 08-Dec-2005, TSa: validator-based validation? if (mVldContent == XMLValidator.CONTENT_ALLOW_NONE) { reportInvalidContent(PROCESSING_INSTRUCTION); } int ix; try { ix = mWriter.writePI(target, data); } catch (IOException ioe) { throw new WstxIOException(ioe); } if (ix >= 0) { throw new XMLStreamException("Illegal input: processing instruction content has embedded '?>' in it (index "+ix+")"); } }
@Override public void writeProcessingInstruction(String target, String data) throws XMLStreamException { mAnyOutput = true; // Need to finish an open start element? if (mStartElementOpen) { closeStartElement(mEmptyElement); } // Structurally, PIs are always ok (content might not be) // 08-Dec-2005, TSa: validator-based validation? if (mVldContent == XMLValidator.CONTENT_ALLOW_NONE) { reportInvalidContent(PROCESSING_INSTRUCTION); } int ix; try { ix = mWriter.writePI(target, data); } catch (IOException ioe) { throw new WstxIOException(ioe); } if (ix >= 0) { throw new XMLStreamException("Illegal input: processing instruction content has embedded '?>' in it (index "+ix+")"); } }
@Override public void writeProcessingInstruction(String target, String data) throws XMLStreamException { mAnyOutput = true; // Need to finish an open start element? if (mStartElementOpen) { closeStartElement(mEmptyElement); } // Structurally, PIs are always ok (content might not be) // 08-Dec-2005, TSa: validator-based validation? if (mVldContent == XMLValidator.CONTENT_ALLOW_NONE) { reportInvalidContent(PROCESSING_INSTRUCTION); } int ix; try { ix = mWriter.writePI(target, data); } catch (IOException ioe) { throw new WstxIOException(ioe); } if (ix >= 0) { throw new XMLStreamException("Illegal input: processing instruction content has embedded '?>' in it (index "+ix+")"); } }
@Override public void writeProcessingInstruction(String target, String data) throws XMLStreamException { mAnyOutput = true; // Need to finish an open start element? if (mStartElementOpen) { closeStartElement(mEmptyElement); } // Structurally, PIs are always ok (content might not be) // 08-Dec-2005, TSa: validator-based validation? if (mVldContent == XMLValidator.CONTENT_ALLOW_NONE) { reportInvalidContent(PROCESSING_INSTRUCTION); } int ix; try { ix = mWriter.writePI(target, data); } catch (IOException ioe) { throw new WstxIOException(ioe); } if (ix >= 0) { throw new XMLStreamException("Illegal input: processing instruction content has embedded '?>' in it (index "+ix+")"); } }
public void writeProcessingInstruction(String target, String data) throws XMLStreamException { mAnyOutput = true; // Need to finish an open start element? if (mStartElementOpen) { closeStartElement(mEmptyElement); } // Structurally, PIs are always ok (content might not be) // 08-Dec-2005, TSa: validator-based validation? if (mVldContent == XMLValidator.CONTENT_ALLOW_NONE) { reportInvalidContent(PROCESSING_INSTRUCTION); } int ix; try { ix = mWriter.writePI(target, data); } catch (IOException ioe) { throw new WstxIOException(ioe); } if (ix >= 0) { throw new XMLStreamException("Illegal input: processing instruction content has embedded '?>' in it (index "+ix+")"); } }
public void writeComment(String data) throws XMLStreamException { mAnyOutput = true; // Need to finish an open start element? if (mStartElementOpen) { closeStartElement(mEmptyElement); } // 08-Dec-2005, TSa: validator-based validation? if (mVldContent == XMLValidator.CONTENT_ALLOW_NONE) { reportInvalidContent(COMMENT); } /* No structural validation needed per se, for comments; they are * allowed anywhere in XML content. However, content may need to * be checked (by XmlWriter) */ int ix; try { ix = mWriter.writeComment(data); } catch (IOException ioe) { throw new WstxIOException(ioe); } if (ix >= 0) { reportNwfContent(ErrorConsts.WERR_COMMENT_CONTENT, DataUtil.Integer(ix)); } }