## com.saxonica.validate
Class ValidatingFilter

    java.lang.Object
      net.sf.saxon.event.SequenceReceiver
          net.sf.saxon.event.ProxyReceiver
              com.saxonica.validate.ValidatingFilter

All Implemented Interfaces:
  javax.xml.transform.Result, Receiver

Direct Known Subclasses:
  ContentValidator, ValidationStack, XSIAttributeHandler

    public class ValidatingFilter

extends ProxyReceiver

This class is used for a filter on the validation pipeline. It provides error reporting services to each of the filters.

Field Summary

Fields inherited from class net.sf.saxon.event.ProxyReceiver
`nextReceiver`

Fields inherited from class net.sf.saxon.event.SequenceReceiver
`pipelineConfiguration, previousAtomic, systemId`

Fields inherited from interface javax.xml.transform.Result
`PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING`

Constructor Summary
`ValidatingFilter()`

Method Summary
`protected java.lang.String` `getErrorCode()`
`protected boolean` `isInvalid()`
`protected void` `reportIfInvalid()`
`protected void` `reportValidationError(ValidationException err, boolean issueComment, int locationId)` Report a validation error
`void` `setErrorCode(java.lang.String errorCode)` Set the error code to be used for error messages
`protected void` `setInvalid(boolean invalid)`

Methods inherited from class net.sf.saxon.event.ProxyReceiver
`append, attribute, characters, close, comment, endDocument, endElement, getConfiguration, getDocumentLocator, getNamePool, getUnderlyingReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument, startElement`

Methods inherited from class net.sf.saxon.event.SequenceReceiver
`getPipelineConfiguration, getSystemId`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ValidatingFilter

    public ValidatingFilter()

Method Detail

### setErrorCode

    public void setErrorCode(java.lang.String errorCode)

  Set the error code to be used for error messages

  Parameters:
    `errorCode` - the error code

### getErrorCode

    protected java.lang.String getErrorCode()

### setInvalid

    protected void setInvalid(boolean invalid)

### isInvalid

    protected boolean isInvalid()

### reportValidationError

    protected void reportValidationError(ValidationException err,
                                         boolean issueComment,
                                         int locationId)
                                  throws XPathException

  Report a validation error

  Parameters:
    `err` - The validation exception
    `issueComment` - true if the validation error message is to be written as an XML comment to the result document
    `locationId` - identifies the location in the source document or stylesheet/query where the validation error was detected
  Throws:
    `XPathException`

### reportIfInvalid

    protected void reportIfInvalid()
                            throws ValidationException

  Throws:
    `ValidationException`

Copyright (c) Saxonica Limited. All rights reserved.