Package com.saxonica.ee.validate
Class SkipValidator
java.lang.Object
net.sf.saxon.event.SequenceReceiver
net.sf.saxon.event.ProxyReceiver
com.saxonica.ee.validate.ValidatingFilter
com.saxonica.ee.validate.ContentValidator
com.saxonica.ee.validate.SkipValidator
This class is a filter that passes all Receiver events through unchanged,
except that it removes all type annotations from element and attribute nodes.
It implements validation="strip" or in schema terms, skip validation
-
Nested Class Summary
Nested classes/interfaces inherited from class com.saxonica.ee.validate.ContentValidator
ContentValidator.Nillability -
Field Summary
Fields inherited from class com.saxonica.ee.validate.ContentValidator
childValidator, nilled, pendingMessagesFields inherited from class net.sf.saxon.event.ProxyReceiver
nextReceiverFields inherited from class net.sf.saxon.event.SequenceReceiver
pipelineConfiguration, previousAtomic, systemIdFields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAppend an arbitrary item (node or atomic value) to the outputprotected ContentValidatorGet a validator to handle the children of the current element.protected ConstraintCheckerGet the constraint checker used in this pipelineGet the schema type against which we are validating, if anyvoidSet the pipeline configurationvoidstartElement(NodeName elemName, SchemaType type, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) Output element start tagMethods inherited from class com.saxonica.ee.validate.ContentValidator
checkNoCharactersWhenNil, checkNoChildrenWhenNil, endDocument, getAnnotation, getContainingElement, getContainingElementLocationId, getContainingElementName, getElementDeclaration, getNamespaceResolver, getNillability, isNilled, makeChildValidator, makeValidator, makeValidatorForType, setAnnotation, setContainingElement, setElementDeclaration, setNillability, setNilled, validateAttributesMethods inherited from class com.saxonica.ee.validate.ValidatingFilter
getAttributeInheritor, getValidationContext, reportIfInvalid, reportValidationError, setConstraintChecker, setStartTagBuffer, setValidationContext, usesTypeAnnotationsMethods inherited from class net.sf.saxon.event.ProxyReceiver
characters, close, comment, endElement, getNamePool, getNextReceiver, open, processingInstruction, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startDocumentMethods inherited from class net.sf.saxon.event.SequenceReceiver
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getPipelineConfiguration, getSystemId, handlesAppend
-
Constructor Details
-
SkipValidator
-
-
Method Details
-
setPipelineConfiguration
Description copied from interface:ReceiverSet the pipeline configuration- Specified by:
setPipelineConfigurationin interfaceReceiver- Overrides:
setPipelineConfigurationin classProxyReceiver- Parameters:
pipe- the pipeline configuration
-
getSchemaType
Get the schema type against which we are validating, if any- Specified by:
getSchemaTypein classContentValidator- Returns:
- the schema type that this validator is validating against, or null
-
getConstraintChecker
Description copied from class:ValidatingFilterGet the constraint checker used in this pipeline- Overrides:
getConstraintCheckerin classValidatingFilter- Returns:
- the constraint checker
-
startElement
public void startElement(NodeName elemName, SchemaType type, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) throws XPathException Output element start tag- Specified by:
startElementin interfaceReceiver- Overrides:
startElementin classContentValidator- Parameters:
elemName- the name of the element.type- 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 classReceiverOption- Throws:
XPathException- if an error occurs
-
getChildValidator
Get a validator to handle the children of the current element. This is called immediately on return from the startElement call that starts this element.- Specified by:
getChildValidatorin classContentValidator- Returns:
- the validator to be used to handle the children
-
append
Description copied from class:ProxyReceiverAppend an arbitrary item (node or atomic value) to the output- Specified by:
appendin interfaceReceiver- Overrides:
appendin classValidatingFilter- Parameters:
item- the item to be appendedlocationId- the location of the calling instruction, for diagnosticscopyNamespaces- if the item is an element node, this indicates whether its namespaces need to be copied. Values areReceiverOption.ALL_NAMESPACES; the default (0) means- Throws:
XPathException- if an error occurs
-