### Saxon.Api

- BinaryResource
- CatalogCollection
- DirectoryCollection
- DocumentBuilder
- DomDestination
- DynamicContext
- DynamicError
- EmptyEnumerator<T>
- ErrorReporter
- ErrorReporterToStaticError
- ErrorReporterWrapper
- ExtensionFunction
- ExtensionFunctionCall
- ExtensionFunctionDefinition
- Feature<T>
- FeatureKeys
- HostLanguage
- ICollectionFinder
- IErrorReporter
- IInvalidityHandler
- IMessageListener
- IMessageListener2
- InvalidityHandlerWrapper
- IPredicate<in XdmItem>
- IQueryResolver
- IResource
- IResourceCollection
- IResourceFactory
- IResultDocumentHandler
- IXmlLocation
- JarCollection
- NamespaceConstant
- NullDestination
- Predicate<T>
- Predicates
- Processor
- QName
- RawDestination
- RecoveryPolicy
- Resource
- ResourceCollection
- SchemaManager
- SchemaResolver
- SchemaValidationMode
- SchemaValidator
- Serializer
- StandardCollectionFinder
- StandardLogger
- StaticContext
- StaticError
- Step<TInput, TResult>
- Steps
- TextWriterDestination
- TreeModel
- URIQueryParameters
- ValidationFailure
- WhitespacePolicy
- XdmAnyArrayType
- XdmAnyFunctionType
- XdmAnyItemType
- XdmAnyMapType
- XdmAnyNodeType
- XdmArray
- XdmAtomicType
- XdmAtomicValue
- XdmAxis
- XdmDestination
  - - TreeProtector
- XdmEmptySequence
- XdmExternalObjectValue
- XdmFunctionItem
- XdmItem
- XdmItemType
- XdmMap
- XdmNode
- XdmNodeKind
- XdmSequenceType
- XdmValue
- XmlDestination
- XmlProcessingError
- XmlResource
- XPathCompiler
- XPathExecutable
- XPathSelector
- XQueryCompiler
- XQueryEvaluator
- XQueryExecutable
- Xslt30Transformer
- XsltCompiler
- XsltExecutable
  - - ParameterDetails
- XsltPackage
- XsltTransformer

### Saxon.Api

# Interface IInvalidityHandler

public interface IInvalidityHandler

Interface for reporting validation errors found during validation of an instance document against a schema.

### Method Summary
XdmValue | endReporting() At the end of a validation episode, do any closedown actions, and optionally return information collected in the course of validation (for example a list of error messages).
void | reportInvalidity(ValidationFailure i) Report a validation error found during validation of an instance document against a schema.
void | startReporting(string systemId) At the start of a validation episode, initialize the handler.

## Method Detail

### endReporting

public XdmValue endReporting()

At the end of a validation episode, do any closedown actions, and optionally return information collected in the course of validation (for example a list of error messages).

Returns:

A value to be associated with a validation exception. May be the empty sequence. In the case of the `InvalidityReportGenerator`, this returns the XML document containing the validation report. This will be the value returned as the value of the variable `$err:value` during try/catch processing.

### reportInvalidity

public void reportInvalidity(ValidationFailure i)

Report a validation error found during validation of an instance document against a schema.

Parameters:

`i` - Details of the validation error.

### startReporting

public void startReporting(string systemId)

At the start of a validation episode, initialize the handler.

Parameters:

`systemId` - Optional; may be used to represent the destination of any report produced.