ServerValidationHandlerpublic class ServerValidationHandler extends DefaultHandler
Fields Summary |
---|
public static final String | SERVER_DTD_PUBLIC_ID | private static final String | SERVER_DTD_PUBLIC_ID_PATH | public static final String | SERVER_DTD_SYSTEM_ID |
Methods Summary |
---|
public void | error(org.xml.sax.SAXParseException e)
//===========================================================
// SAX ErrorHandler methods
//===========================================================
// treat validation errors as fatal
/*
_logger.log(Level.SEVERE,"config.errorhandler_msg",new Object[]{"" + e.getLineNumber(),
"" + e.getColumnNumber(),
"" + e.getSystemId(),
"" + e.getPublicId()});
_logger.log(Level.SEVERE," " + e.getMessage());
*/
throw e;
| public void | fatalError(org.xml.sax.SAXParseException e)
/*
_logger.log(Level.SEVERE,"config.errorhandler_msg",new Object[]{"" + e.getLineNumber(),
"" + e.getColumnNumber(),
"" + e.getSystemId(),
"" + e.getPublicId()});
_logger.log(Level.SEVERE, e.toString());
*/
throw e;
| public org.xml.sax.InputSource | resolveEntity(java.lang.String publicID, java.lang.String systemID)
InputSource is = null;
try {
InputStream i = this.getClass().getResourceAsStream( SERVER_DTD_PUBLIC_ID_PATH );
if( i!= null ) {
is = new InputSource(i);
return is;
}
is = new InputSource(
new FileInputStream(
new File(new java.net.URI(
RelativePathResolver.resolvePath(systemID)))));
} catch(Exception e) {
throw new SAXException("cannot resolve dtd", e);
}
return is;
| public void | warning(org.xml.sax.SAXParseException e)
/*
_logger.log(Level.WARNING,"config.errorhandler_msg",new Object[]{"" + e.getLineNumber(),
"" + e.getColumnNumber(),
"" + e.getSystemId(),
"" + e.getPublicId()});
_logger.log(Level.WARNING," " + e.getMessage());
*/
//FIXME
|
|