use of org.apache.xml.utils.SAXSourceLocator in project robovm by robovm.
the class StylesheetHandler method warning.
/**
* Receive notification of a XSLT processing warning.
*
* @param e The warning information encoded as an exception.
*
* @throws org.xml.sax.SAXException that wraps a
* {@link javax.xml.transform.TransformerException} if the current
* {@link javax.xml.transform.ErrorListener#warning}
* method chooses to flag this condition as an error.
*/
public void warning(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException {
String formattedMsg = e.getMessage();
SAXSourceLocator locator = getLocator();
ErrorListener handler = m_stylesheetProcessor.getErrorListener();
try {
handler.warning(new TransformerException(formattedMsg, locator));
} catch (TransformerException te) {
throw new org.xml.sax.SAXException(te);
}
}
use of org.apache.xml.utils.SAXSourceLocator in project robovm by robovm.
the class StylesheetHandler method error.
/**
* Tell the user of an error, and probably throw an
* exception.
*
* @param msg An error message.
* @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, Exception e) throws org.xml.sax.SAXException {
SAXSourceLocator locator = getLocator();
ErrorListener handler = m_stylesheetProcessor.getErrorListener();
TransformerException pe;
if (!(e instanceof TransformerException)) {
pe = (null == e) ? new TransformerException(msg, locator) : new TransformerException(msg, locator, e);
} else
pe = (TransformerException) e;
if (null != handler) {
try {
handler.error(pe);
} catch (TransformerException te) {
throw new org.xml.sax.SAXException(te);
}
} else
throw new org.xml.sax.SAXException(pe);
}
use of org.apache.xml.utils.SAXSourceLocator in project j2objc by google.
the class StylesheetHandler method getLocator.
/**
* Get the current stylesheet Locator object.
*
* @return non-null reference to the current locator object.
*/
public SAXSourceLocator getLocator() {
if (m_stylesheetLocatorStack.isEmpty()) {
SAXSourceLocator locator = new SAXSourceLocator();
locator.setSystemId(this.getStylesheetProcessor().getDOMsystemID());
return locator;
// m_stylesheetLocatorStack.push(locator);
}
return ((SAXSourceLocator) m_stylesheetLocatorStack.peek());
}
use of org.apache.xml.utils.SAXSourceLocator in project j2objc by google.
the class StylesheetHandler method fatalError.
/**
* Report a fatal XSLT processing error.
*
* @param e The error information encoded as an exception.
*
* @throws org.xml.sax.SAXException that wraps a
* {@link javax.xml.transform.TransformerException} if the current
* {@link javax.xml.transform.ErrorListener#fatalError}
* method chooses to flag this condition as an error.
*/
public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException {
String formattedMsg = e.getMessage();
SAXSourceLocator locator = getLocator();
ErrorListener handler = m_stylesheetProcessor.getErrorListener();
try {
handler.fatalError(new TransformerException(formattedMsg, locator));
} catch (TransformerException te) {
throw new org.xml.sax.SAXException(te);
}
}
use of org.apache.xml.utils.SAXSourceLocator in project j2objc by google.
the class StylesheetHandler method warning.
/**
* Receive notification of a XSLT processing warning.
*
* @param e The warning information encoded as an exception.
*
* @throws org.xml.sax.SAXException that wraps a
* {@link javax.xml.transform.TransformerException} if the current
* {@link javax.xml.transform.ErrorListener#warning}
* method chooses to flag this condition as an error.
*/
public void warning(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException {
String formattedMsg = e.getMessage();
SAXSourceLocator locator = getLocator();
ErrorListener handler = m_stylesheetProcessor.getErrorListener();
try {
handler.warning(new TransformerException(formattedMsg, locator));
} catch (TransformerException te) {
throw new org.xml.sax.SAXException(te);
}
}
Aggregations