public class InvalidityReportGeneratorEE extends InvalidityReportGenerator
InvalidityReportGenerator
extends the standard error handler for errors found during validation
of an instance document against a schema, used if user specifies -report option on validate. Its effect is to output
the validation errors found into the filename specified in an XML format.REPORT_NS
Constructor and Description |
---|
InvalidityReportGeneratorEE(Configuration config) |
InvalidityReportGeneratorEE(Configuration config,
Destination destination)
Create a Report Invalidity Handler writing to a s9api Destination
|
InvalidityReportGeneratorEE(Configuration config,
Receiver receiver)
Create a Report Invalidity Handler writing to a Receiver
|
Modifier and Type | Method and Description |
---|---|
void |
createMetaData()
Create metedata element which contains summary information in the output XML document
|
Sequence<?> |
endReporting()
Get the value to be associated with a validation exception.
|
Destination |
getDestination() |
int |
getErrorCount() |
int |
getWarningCount() |
javax.xml.stream.XMLStreamWriter |
getWriter() |
void |
reportInvalidity(Invalidity failure)
Receive notification of a validity error.
|
void |
setDestination(Destination destination)
Set the writer
|
void |
setReceiver(Receiver receiver)
Set the receiver
|
void |
setSchemaName(java.lang.String name)
Set the XSD document used to validation process
|
void |
setSystemId(java.lang.String id)
Set the XML document that is to be validated
|
void |
setXsdVersion(java.lang.String version) |
void |
startReporting(java.lang.String systemId)
At the start of a validation episode, initialize the handler
|
abbreviatePath, getConfiguration, getConstraintReferenceMessage, getExpandedMessage, getLocationMessage, getLogger, setLogger
public InvalidityReportGeneratorEE(Configuration config)
public InvalidityReportGeneratorEE(Configuration config, Destination destination) throws SaxonApiException
config
- the Saxon configurationdestination
- required to output the validation errorsSaxonApiException
public InvalidityReportGeneratorEE(Configuration config, Receiver receiver) throws XPathException
config
- the Saxon configurationreceiver
- required to output the validation errorsXPathException
public void setReceiver(Receiver receiver)
InvalidityReportGenerator
setReceiver
in class InvalidityReportGenerator
receiver
- required to output the validation errorspublic void setDestination(Destination destination) throws SaxonApiException
destination
- required to output the validation errorsSaxonApiException
public void setSystemId(java.lang.String id)
setSystemId
in class InvalidityReportGenerator
id
- of the source documentpublic void setSchemaName(java.lang.String name)
setSchemaName
in class InvalidityReportGenerator
name
- of xsd filepublic int getErrorCount()
getErrorCount
in class InvalidityReportGenerator
public int getWarningCount()
getWarningCount
in class InvalidityReportGenerator
public void setXsdVersion(java.lang.String version)
setXsdVersion
in class InvalidityReportGenerator
public javax.xml.stream.XMLStreamWriter getWriter()
getWriter
in class InvalidityReportGenerator
public void reportInvalidity(Invalidity failure) throws XPathException
reportInvalidity
in interface InvalidityHandler
reportInvalidity
in class InvalidityReportGenerator
failure
- Information about the nature of the invalidityXPathException
- - if the validation error cannot be reported.
This is fatal and will cause the validation run to be abandonedpublic Destination getDestination()
public void startReporting(java.lang.String systemId) throws XPathException
InvalidityReportGenerator
startReporting
in interface InvalidityHandler
startReporting
in class InvalidityReportGenerator
systemId
- optional; may be used to represent the destination of any report producedXPathException
- if initialization of the invalidity handler fails for any reasonpublic Sequence<?> endReporting() throws XPathException
StandardInvalidityHandler
endReporting
in interface InvalidityHandler
endReporting
in class InvalidityReportGenerator
XPathException
- if an error occurs creating any validation reportpublic void createMetaData() throws XPathException
createMetaData
in class InvalidityReportGenerator
XPathException
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.