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, setLoggerpublic InvalidityReportGeneratorEE(Configuration config)
public InvalidityReportGeneratorEE(Configuration config, Destination destination) throws SaxonApiException
config - the Saxon configurationdestination - required to output the validation errorsSaxonApiExceptionpublic InvalidityReportGeneratorEE(Configuration config, Receiver receiver) throws XPathException
config - the Saxon configurationreceiver - required to output the validation errorsXPathExceptionpublic void setReceiver(Receiver receiver)
InvalidityReportGeneratorsetReceiver in class InvalidityReportGeneratorreceiver - required to output the validation errorspublic void setDestination(Destination destination) throws SaxonApiException
destination - required to output the validation errorsSaxonApiExceptionpublic void setSystemId(java.lang.String id)
setSystemId in class InvalidityReportGeneratorid - of the source documentpublic void setSchemaName(java.lang.String name)
setSchemaName in class InvalidityReportGeneratorname - of xsd filepublic int getErrorCount()
getErrorCount in class InvalidityReportGeneratorpublic int getWarningCount()
getWarningCount in class InvalidityReportGeneratorpublic void setXsdVersion(java.lang.String version)
setXsdVersion in class InvalidityReportGeneratorpublic javax.xml.stream.XMLStreamWriter getWriter()
getWriter in class InvalidityReportGeneratorpublic void reportInvalidity(Invalidity failure) throws XPathException
reportInvalidity in interface InvalidityHandlerreportInvalidity in class InvalidityReportGeneratorfailure - 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
InvalidityReportGeneratorstartReporting in interface InvalidityHandlerstartReporting in class InvalidityReportGeneratorsystemId - 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
StandardInvalidityHandlerendReporting in interface InvalidityHandlerendReporting in class InvalidityReportGeneratorXPathException - if an error occurs creating any validation reportpublic void createMetaData()
throws XPathException
createMetaData in class InvalidityReportGeneratorXPathExceptionCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.