private void report(short severity, String type) { if (errorHandler != null) { // TODO: abort if handleError returns false errorHandler.handleError(new DOMErrorImpl(severity, type)); } } }
/** * Checks if an Text node is well-formed, by checking if it contains invalid * XML characters. * * @param data The contents of the comment node */ protected void isTextWellFormed(Text node) { // Does the data valid XML character data Character invalidChar = isWFXMLChar(node.getData()); if (invalidChar != null) { String msg = Utils.messages.createMessage( MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, new Object[] { Integer.toHexString(Character.getNumericValue(invalidChar.charValue())) }); if (fErrorHandler != null) { fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR, msg, MsgKey.ER_WF_INVALID_CHARACTER, null, null, null)); } } }
/** * Checks if an Text node is well-formed, by checking if it contains invalid * XML characters. * * @param data The contents of the comment node */ protected void isTextWellFormed(Text node) { // Does the data valid XML character data Character invalidChar = isWFXMLChar(node.getData()); if (invalidChar != null) { String msg = Utils.messages.createMessage( MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, new Object[] { Integer.toHexString(Character.getNumericValue(invalidChar.charValue())) }); if (fErrorHandler != null) { fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR, msg, MsgKey.ER_WF_INVALID_CHARACTER, null, null, null)); } } }
fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_ERROR,
fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_ERROR,
fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR,
fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR, fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR,
/** * Checks if an CDATASection node is well-formed, by checking it's data * for well-formedness. Note that the presence of a CDATA termination mark * in the contents of a CDATASection is handled by the parameter * spli-cdata-sections * * @param data The contents of the comment node */ protected void isCDATASectionWellFormed(CDATASection node) { // Does the data valid XML character data Character invalidChar = isWFXMLChar(node.getData()); //if (!isWFXMLChar(node.getData(), invalidChar)) { if (invalidChar != null) { String msg = Utils.messages.createMessage( MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, new Object[] { Integer.toHexString(Character.getNumericValue(invalidChar.charValue())) }); if (fErrorHandler != null) { fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR, msg, MsgKey.ER_WF_INVALID_CHARACTER, null, null, null)); } } }
fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR,
fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR, fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR,
/** * Checks if an CDATASection node is well-formed, by checking it's data * for well-formedness. Note that the presence of a CDATA termination mark * in the contents of a CDATASection is handled by the parameter * spli-cdata-sections * * @param data The contents of the comment node */ protected void isCDATASectionWellFormed(CDATASection node) { // Does the data valid XML character data Character invalidChar = isWFXMLChar(node.getData()); //if (!isWFXMLChar(node.getData(), invalidChar)) { if (invalidChar != null) { String msg = Utils.messages.createMessage( MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, new Object[] { Integer.toHexString(Character.getNumericValue(invalidChar.charValue())) }); if (fErrorHandler != null) { fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR, msg, MsgKey.ER_WF_INVALID_CHARACTER, null, null, null)); } } }
fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR, fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR,
fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_ERROR,
fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_ERROR,
fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR, fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR,
fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR, fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR,
} catch (Exception e) { if (fDOMErrorHandler != null) { fDOMErrorHandler.handleError(new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR, e.getMessage(), null, e));
fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_WARNING, fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_ERROR,
fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_WARNING, fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_ERROR,
fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR, fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR, fErrorHandler.handleError( new DOMErrorImpl( DOMError.SEVERITY_FATAL_ERROR,