public class ValidationStack extends ValidatingFilter
nextReceiver
pipelineConfiguration, previousAtomic, systemId
Constructor and Description |
---|
ValidationStack(Receiver next,
int initialValidationMode,
SchemaType initialType)
Create a validation stack
|
Modifier and Type | Method and Description |
---|---|
void |
characters(UnicodeString chars,
Location locationId,
int properties)
Character data
|
void |
endDocument()
Notify the end of a document node
|
void |
endElement()
End of element
|
java.util.Map<SchemaComponent,java.lang.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(java.lang.String name,
java.lang.String uri,
java.lang.String publicId)
Set the URI for an unparsed entity in the document.
|
void |
setXsiValidationErrors(java.util.List<ValidationFailure> errors)
Supply a list of errors found in attributes in the XSI namespace.
|
void |
startElement(NodeName elemName,
SchemaType typeCode,
AttributeMap attributes,
NamespaceMap namespaces,
Location location,
int properties)
Process element start tag
|
append, getAttributeInheritor, getConstraintChecker, getValidationContext, reportIfInvalid, reportValidationError, setConstraintChecker, setStartTagBuffer, setValidationContext, usesTypeAnnotations
close, comment, getNamePool, getNextReceiver, open, processingInstruction, setSystemId, setUnderlyingReceiver, startDocument
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getPipelineConfiguration, getSystemId, handlesAppend
public 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)
Receiver
setPipelineConfiguration
in interface Receiver
setPipelineConfiguration
in class ProxyReceiver
pipe
- 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(java.lang.String name, java.lang.String uri, java.lang.String publicId) throws XPathException
setUnparsedEntity
in interface Receiver
setUnparsedEntity
in class ProxyReceiver
name
- 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(java.util.List<ValidationFailure> errors)
errors
- the list of errorspublic void startElement(NodeName elemName, SchemaType typeCode, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) throws XPathException
startElement
in interface Receiver
startElement
in class ProxyReceiver
elemName
- the name of the element.typeCode
- the type annotation of the element.attributes
- the attributes of this elementnamespaces
- the in-scope namespaces of this element: generally this is all the in-scope
namespaces, without relying on inheriting namespaces from parent elementslocation
- an object providing information about the module, line, and column where the node originatedproperties
- bit-significant properties of the element node. If there are no relevant
properties, zero is supplied. The definitions of the bits are in class ReceiverOption
XPathException
- if an error occurspublic void setInitialValidator(ContentValidator validator)
validator
- the validator to be used for the outermost element being validatedpublic void characters(UnicodeString chars, Location locationId, int properties) throws XPathException
ProxyReceiver
characters
in interface Receiver
characters
in class ProxyReceiver
chars
- The characterslocationId
- provides information such as line number and system ID.properties
- Bit significant value. The following bits are defined:
XPathException
- if an error occurspublic void endElement() throws XPathException
endElement
in interface Receiver
endElement
in class ProxyReceiver
XPathException
- if an error occurspublic void endDocument() throws XPathException
endDocument
in interface Receiver
endDocument
in class ProxyReceiver
XPathException
- if an error occurspublic void setKeepStatistics(boolean keep)
keep
- true if statistics are to be kept, false if notpublic java.util.Map<SchemaComponent,java.lang.Integer> getCoverageStatistics()
Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.