Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.novell.xsl
Interface ErrorHandler

All Known Implementing Classes:
  DefaultErrorHandler, XSLTHandler

    public interface ErrorHandler

An interface for reporting XSL errors and warnings.

The error handling philosophy is as follows:

- The XSL processor assumes that a non-validating XML parser is used, so source documents and stylesheets arrive well-formed but not necessarily valid. If it turns out the XML parser is a validating one, it the XSL processor will end up performing some redundant error checking.
- The XSL processor uses this interface to report errors for violations of the XSL specification, including violations of validity constraints.
- The XSL processor uses this interface to report warnings for legal XSL conditions that are likely to be mistakes.
- Classes representing patterns, rules, templates, etc. throw conventional Java exceptions rather than using this interface, the assumption being that a front-end parser should have detected errors and warnings.

Method Summary
`void` | `error(String message)` Receive notification of an XSL error.
`int` | `getErrorCount()` Returns the number of errors that have occurred so far.
`int` | `getWarningCount()` Returns the number of warnings that have occurred so far.
`void` | `resetCounts()` Resets the number of errors and warnings to zero.
`void` | `warning(String message)` Receive notification of an XSL warning.

Method Detail

### getErrorCount

    int getErrorCount()

  Returns the number of errors that have occurred so far.

  Returns:
    the number of errors

### getWarningCount

    int getWarningCount()

  Returns the number of warnings that have occurred so far.

  Returns:
    the number of warnings

### resetCounts

    void resetCounts()

  Resets the number of errors and warnings to zero.

### error

    void error(String message)
               throws XSLException

  Receive notification of an XSL error.

  If this method returns normally, the XSL processor will do its best to recover and continue processing. The result document may be incomplete or even empty.

  If this method throws an exception, the error is fatal and the XSL processor will abort processing and propagate the exception.

  Parameters:
    `message` - the error message
  Throws:
    `XSLException` - if the error is fatal

### warning

    void warning(String message)

  Receive notification of an XSL warning. Note that this method does not throw an `XSLException` since warnings are never fatal.

  Parameters:
    `message` - the warning message

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD