fi.iki.hsivonen.verifierservlet
Class XhtmlEmittingErrorHandler
java.lang.Object
fi.iki.hsivonen.verifierservlet.XhtmlEmittingErrorHandler
- All Implemented Interfaces:
- ErrorHandler
public class XhtmlEmittingErrorHandler
- extends Object
- implements ErrorHandler
- Version:
- $Id: XhtmlEmittingErrorHandler.java,v 1.16 2006/12/01 12:52:52 hsivonen Exp $
- Author:
- hsivonen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INFO
private static final char[] INFO
WARNING
private static final char[] WARNING
ERROR
private static final char[] ERROR
FATAL_ERROR
private static final char[] FATAL_ERROR
IO_ERROR
private static final char[] IO_ERROR
INTERNAL_ERROR
private static final char[] INTERNAL_ERROR
SCHEMA_ERROR
private static final char[] SCHEMA_ERROR
SPACE
private static final char[] SPACE
LINE
private static final char[] LINE
COLUMN
private static final char[] COLUMN
IN_RESOURCE
private static final char[] IN_RESOURCE
emitter
private XhtmlSaxEmitter emitter
listOpen
private boolean listOpen
warnings
private int warnings
errors
private int errors
fatalErrors
private int fatalErrors
XhtmlEmittingErrorHandler
public XhtmlEmittingErrorHandler(ContentHandler contentHandler)
- Parameters:
contentHandler
-
scrub
private static String scrub(String s)
throws SAXException
- Throws:
SAXException
getErrors
public int getErrors()
- Returns:
- Returns the errors.
getFatalErrors
public int getFatalErrors()
- Returns:
- Returns the fatalErrors.
getWarnings
public int getWarnings()
- Returns:
- Returns the warnings.
maybeOpenList
private void maybeOpenList()
throws SAXException
- Throws:
SAXException
emitMessage
private void emitMessage(String message)
throws SAXException
- Throws:
SAXException
emitErrorLevel
private void emitErrorLevel(char[] level)
throws SAXException
- Throws:
SAXException
emitError
private void emitError(char[] level,
SAXParseException e)
throws SAXException
- Throws:
SAXException
emitError
private void emitError(char[] level,
Exception e)
throws SAXException
- Throws:
SAXException
emitErrorLocation
private void emitErrorLocation(SAXParseException e)
throws SAXException
- Parameters:
e
-
- Throws:
SAXException
emitErrorMsg
private void emitErrorMsg(char[] level,
Exception e)
throws SAXException
- Parameters:
level
- e
-
- Throws:
SAXException
warning
public void warning(SAXParseException e)
throws SAXException
- Specified by:
warning
in interface ErrorHandler
- Throws:
SAXException
- See Also:
ErrorHandler.warning(org.xml.sax.SAXParseException)
error
public void error(SAXParseException e)
throws SAXException
- Specified by:
error
in interface ErrorHandler
- Throws:
SAXException
- See Also:
ErrorHandler.error(org.xml.sax.SAXParseException)
fatalError
public void fatalError(SAXParseException e)
throws SAXException
- Specified by:
fatalError
in interface ErrorHandler
- Throws:
SAXException
- See Also:
ErrorHandler.fatalError(org.xml.sax.SAXParseException)
end
public void end()
throws SAXException
- Throws:
SAXException
start
public void start()
throws SAXException
- Throws:
SAXException
info
public void info(String str)
throws SAXException
- Parameters:
e
-
- Throws:
SAXException
ioError
public void ioError(IOException e)
throws SAXException
- Parameters:
e
-
- Throws:
SAXException
internalError
public void internalError(Throwable e,
String message)
throws SAXException
- Parameters:
e
-
- Throws:
SAXException
levelToClass
private String levelToClass(char[] level)
schemaError
public void schemaError(Exception e)
throws SAXException
- Parameters:
e
-
- Throws:
SAXException
isErrors
public boolean isErrors()