public class ValidationStack extends ValidatingFilter
locallyInvalidnextReceiverpipelineConfiguration, previousAtomic, systemIdPI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING| Constructor and Description |
|---|
ValidationStack(Receiver next,
int initialValidationMode,
SchemaType initialType)
Create a validation stack
|
| Modifier and Type | Method and Description |
|---|---|
void |
attribute(NodeName nameCode,
SimpleType typeCode,
CharSequence value,
int locationId,
int properties)
Handle an attribute
|
void |
characters(CharSequence chars,
int locationId,
int properties)
Character data
|
void |
endDocument()
Notify the end of a document node
|
void |
endElement()
End of element
|
Map<SchemaComponent,Integer> |
getCoverageStatistics()
Get the statistics showing the usage of individual schema components during a validation episode
|
NodeName |
getTopLevelElement()
Get the name of the required top-level element (if any)
|
void |
setInitialValidator(ContentValidator validator)
Set the initial validator to be used for the outermost element
|
void |
setIsNilled(boolean nilled)
Indicate whether the current element is nilled
|
void |
setKeepStatistics(boolean keep)
Ask that statistics be maintained for the duration of the validation episode.
|
void |
setPipelineConfiguration(PipelineConfiguration pipe)
Set the pipeline configuration
|
void |
setTopLevelElement(NodeName name)
Set the name of the required top-level element (if any)
|
void |
setUnparsedEntity(String name,
String uri,
String publicId)
Set the URI for an unparsed entity in the document.
|
void |
setXsiValidationErrors(List errors)
Supply a list of errors found in attributes in the XSI namespace.
|
void |
startContent()
Notify the start of the content, that is, the completion of all attributes and namespaces.
|
void |
startElement(NodeName elemName,
SchemaType typeCode,
int locationId,
int properties)
Process element start tag
|
void |
testAssertions(NodeInfo root,
UserComplexType type)
Test whether all the assertions on a given complex type are true
|
append, getConstraintChecker, getStartTagBuffer, getValidationContext, reportIfInvalid, reportValidationError, setConstraintChecker, setStartTagBuffer, setValidationContext, usesTypeAnnotationsclose, comment, getNamePool, getUnderlyingReceiver, namespace, open, processingInstruction, setSystemId, setUnderlyingReceiver, startDocumentappend, getConfiguration, getPipelineConfiguration, getSystemIdpublic ValidationStack(Receiver next, int initialValidationMode, SchemaType initialType)
next - the destination of events after passing through validationinitialValidationMode - the initial validation mode, strict/laxinitialType - the initial type to validate against, if anypublic void setPipelineConfiguration(PipelineConfiguration pipe)
ReceiversetPipelineConfiguration in interface ReceiversetPipelineConfiguration in class ProxyReceiverpipe - the pipeline configurationpublic void setTopLevelElement(NodeName name)
name - the name of the element that must appear at the root of the subtree
being validatedpublic NodeName getTopLevelElement()
public void setUnparsedEntity(String name, String uri, String publicId) throws XPathException
setUnparsedEntity in interface ReceiversetUnparsedEntity in class ProxyReceivername - The name of the unparsed entityuri - The system identifier of the unparsed entitypublicId - The public identifier of the unparsed entityXPathException - if an error occurspublic void setIsNilled(boolean nilled)
nilled - true if xsi:nil is setpublic void setXsiValidationErrors(List errors)
public void startElement(NodeName elemName, SchemaType typeCode, int locationId, int properties) throws XPathException
startElement in interface ReceiverstartElement in class ProxyReceiverelemName - integer code identifying the name of the element within the name pool.typeCode - integer code identifying the element's type within the name pool.locationId - an integer which can be interpreted using a LocationProvider to return
information such as line number and system ID. If no location information is available,
the value zero is supplied.properties - properties of the element nodeXPathException - if an error occurspublic void setInitialValidator(ContentValidator validator)
validator - the validator to be used for the outermost element being validatedpublic void attribute(NodeName nameCode, SimpleType typeCode, CharSequence value, int locationId, int properties) throws XPathException
attribute in interface Receiverattribute in class ProxyReceivernameCode - integer identifying the name of the attributetypeCode - integer identifying the pre-validation type annotation (typically untypedAtomic)value - the value of the attributeproperties - additional properties of the attributelocationId - an integer which can be interpreted using a LocationProvider to return
information such as line number and system ID. If no location information is available,
the value zero is supplied.XPathException - On any failure to write the attributepublic final void startContent()
throws XPathException
startContent in interface ReceiverstartContent in class ProxyReceiverXPathException - if an error occurspublic void characters(CharSequence chars, int locationId, int properties) throws XPathException
ProxyReceivercharacters in interface Receivercharacters in class ProxyReceiverchars - The characterslocationId - an integer which can be interpreted using a LocationProvider
to return information such as line number and system ID. If no location information is available,
the value zero is supplied.properties - Bit significant value. The following bits are defined:
XPathException - if an error occurspublic void endElement()
throws XPathException
endElement in interface ReceiverendElement in class ProxyReceiverXPathException - if an error occurspublic void endDocument()
throws XPathException
endDocument in interface ReceiverendDocument in class ProxyReceiverXPathException - if an error occurspublic void testAssertions(NodeInfo root, UserComplexType type) throws XPathException
root - the element whose assertions are to be testedtype - the type on which the assertions are definedValidationException - if any of the assertions are not trueXPathExceptionpublic void setKeepStatistics(boolean keep)
keep - true if statistics are to be kept, false if notpublic Map<SchemaComponent,Integer> getCoverageStatistics()
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.