/** * Receive notification of character data inside an element. * * * @param handler non-null reference to current StylesheetHandler that is constructing the Templates. * @param ch The characters. * @param start The start position in the character array. * @param length The number of characters to use from the * character array. */ public void characters( StylesheetHandler handler, char ch[], int start, int length) throws org.xml.sax.SAXException { handler.error(XSLTErrorResources.ER_CHARS_NOT_ALLOWED, null, null);//"Characters are not allowed at this point in the document!", //null); }
/** * Receive notification of character data inside an element. * * * @param handler non-null reference to current StylesheetHandler that is constructing the Templates. * @param ch The characters. * @param start The start position in the character array. * @param length The number of characters to use from the * character array. */ public void characters( StylesheetHandler handler, char ch[], int start, int length) throws org.xml.sax.SAXException { handler.error(XSLTErrorResources.ER_CHARS_NOT_ALLOWED, null, null);//"Characters are not allowed at this point in the document!", //null); }
/** * Tell the user of an error, and probably throw an * exception. * * @param msg A key into the {@link org.apache.xalan.res.XSLTErrorResources} * table, that is one of the WG_ prefixed definitions. * @param args An array of arguments for the given warning. * @param e An error which the SAXException should wrap. * * @throws org.xml.sax.SAXException that wraps a * {@link javax.xml.transform.TransformerException} if the current * {@link javax.xml.transform.ErrorListener#error} * method chooses to flag this condition as an error. * @xsl.usage internal */ protected void error(String msg, Object args[], Exception e) throws org.xml.sax.SAXException { String formattedMsg = XSLMessages.createMessage(msg, args); error(formattedMsg, e); }
/** * Tell the user of an error, and probably throw an * exception. * * @param msg A key into the {@link org.apache.xalan.res.XSLTErrorResources} * table, that is one of the WG_ prefixed definitions. * @param args An array of arguments for the given warning. * @param e An error which the SAXException should wrap. * * @throws org.xml.sax.SAXException that wraps a * {@link javax.xml.transform.TransformerException} if the current * {@link javax.xml.transform.ErrorListener#error} * method chooses to flag this condition as an error. * @xsl.usage internal */ protected void error(String msg, Object args[], Exception e) throws org.xml.sax.SAXException { String formattedMsg = XSLMessages.createMessage(msg, args); error(formattedMsg, e); }
private void handleError(StylesheetHandler handler, String msg, Object [] args, Exception exc) throws org.xml.sax.SAXException { switch (getErrorType()) { case (FATAL): case (ERROR): handler.error(msg, args, exc); break; case (WARNING): handler.warn(msg, args); default: break; } } }
private void handleError(StylesheetHandler handler, String msg, Object [] args, Exception exc) throws org.xml.sax.SAXException { switch (getErrorType()) { case (FATAL): case (ERROR): handler.error(msg, args, exc); break; case (WARNING): handler.warn(msg, args); default: break; } } }
error(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_ALLOWED_IN_POSITION, new Object[]{rawName}),null);//rawName + " is not allowed in this position in the stylesheet!",
error(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_ALLOWED_IN_POSITION, new Object[]{rawName}),null);//rawName + " is not allowed in this position in the stylesheet!",
/** * Receive notification of the end of an element. * * @param handler non-null reference to current StylesheetHandler that is constructing the Templates. * @param uri The Namespace URI, or an empty string. * @param localName The local name (without prefix), or empty string if not namespace processing. * @param rawName The qualified name (with prefix). */ public void endElement( StylesheetHandler handler, String uri, String localName, String rawName) throws org.xml.sax.SAXException { if (m_savedLastOrder != null && !m_savedLastOrder.empty()) getElemDef().setLastOrder(m_savedLastOrder.pop()); if (!getElemDef().getRequiredFound()) handler.error(XSLTErrorResources.ER_REQUIRED_ELEM_NOT_FOUND, new Object[]{getElemDef().getRequiredElem()}, null); }
/** * Receive notification of the end of an element. * * @param handler non-null reference to current StylesheetHandler that is constructing the Templates. * @param uri The Namespace URI, or an empty string. * @param localName The local name (without prefix), or empty string if not namespace processing. * @param rawName The qualified name (with prefix). */ public void endElement( StylesheetHandler handler, String uri, String localName, String rawName) throws org.xml.sax.SAXException { if (m_savedLastOrder != null && !m_savedLastOrder.empty()) getElemDef().setLastOrder(m_savedLastOrder.pop()); if (!getElemDef().getRequiredFound()) handler.error(XSLTErrorResources.ER_REQUIRED_ELEM_NOT_FOUND, new Object[]{getElemDef().getRequiredElem()}, null); }
handler.error(te.getMessage(), te);