Package com.saxonica.ee.validate
Class ValidatingFilter
- java.lang.Object
- 
- net.sf.saxon.event.SequenceReceiver
- 
- net.sf.saxon.event.ProxyReceiver
- 
- com.saxonica.ee.validate.ValidatingFilter
 
 
 
- 
- All Implemented Interfaces:
- javax.xml.transform.Result,- Receiver
 - Direct Known Subclasses:
- ContentValidator,- EntityValidator,- IdValidator,- ValidationStack,- XSIAttributeHandler
 
 public class ValidatingFilter extends ProxyReceiver This class is used for a filter on the validation pipeline. It provides error reporting services to each of the filters.
- 
- 
Field Summary- 
Fields inherited from class net.sf.saxon.event.ProxyReceivernextReceiver
 - 
Fields inherited from class net.sf.saxon.event.SequenceReceiverpipelineConfiguration, previousAtomic, systemId
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappend(Item item, Location locationId, int copyNamespaces)Append an arbitrary item (node or atomic value) to the outputAttributeInheritorgetAttributeInheritor()Get the AttributeInheritor which maintains details of inherited attributes for use in conditional type assignmentprotected ConstraintCheckergetConstraintChecker()Get the constraint checker used in this pipelineValidationContextgetValidationContext()Get the validation context for this validation episodeprotected voidreportIfInvalid()protected voidreportValidationError(ValidationFailure err, boolean issueComment, Location locationId)Report a validation errorvoidsetConstraintChecker(ConstraintChecker checker)Set the constraint checker used in this pipelinevoidsetStartTagBuffer(AttributeInheritor startTag)Set the StartTagBuffer, which buffers attributes on the element start tag, and also acts as the namespaceResolver to be used for resolving QName-valued attributesvoidsetValidationContext(ValidationContext validationContext)Set the validation context for this validation episodebooleanusesTypeAnnotations()Ask whether this Receiver (or the downstream pipeline) makes any use of the type annotations supplied on element and attribute events- 
Methods inherited from class net.sf.saxon.event.ProxyReceivercharacters, close, comment, endDocument, endElement, getNamePool, getNextReceiver, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startDocument, startElement
 - 
Methods inherited from class net.sf.saxon.event.SequenceReceiverappend, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getPipelineConfiguration, getSystemId, handlesAppend
 
- 
 
- 
- 
- 
Method Detail- 
getValidationContextpublic ValidationContext getValidationContext() Get the validation context for this validation episode- Returns:
- the validation context
 
 - 
setValidationContextpublic void setValidationContext(ValidationContext validationContext) Set the validation context for this validation episode- Parameters:
- validationContext- the validation context
 
 - 
setConstraintCheckerpublic void setConstraintChecker(ConstraintChecker checker) Set the constraint checker used in this pipeline- Parameters:
- checker- the constraint checker
 
 - 
getConstraintCheckerprotected ConstraintChecker getConstraintChecker() Get the constraint checker used in this pipeline- Returns:
- the constraint checker
 
 - 
setStartTagBufferpublic void setStartTagBuffer(AttributeInheritor startTag) Set the StartTagBuffer, which buffers attributes on the element start tag, and also acts as the namespaceResolver to be used for resolving QName-valued attributes- Parameters:
- startTag- the namespace resolver
 
 - 
getAttributeInheritorpublic AttributeInheritor getAttributeInheritor() Get the AttributeInheritor which maintains details of inherited attributes for use in conditional type assignment- Returns:
- the AttributeInheritor
 
 - 
usesTypeAnnotationspublic boolean usesTypeAnnotations() Ask whether this Receiver (or the downstream pipeline) makes any use of the type annotations supplied on element and attribute events- Specified by:
- usesTypeAnnotationsin interface- Receiver
- Overrides:
- usesTypeAnnotationsin class- ProxyReceiver
- Returns:
- true if the Receiver makes any use of this information. If false, the caller may supply untyped nodes instead of supplying the type annotation. Validation filters overwrite any type annotations arriving in the input event stream, so this instance of the method returns false.
 
 - 
appendpublic void append(Item item, Location locationId, int copyNamespaces) throws XPathException Description copied from class:ProxyReceiverAppend an arbitrary item (node or atomic value) to the output- Specified by:
- appendin interface- Receiver
- Overrides:
- appendin class- ProxyReceiver
- Parameters:
- item- the item to be appended
- locationId- the location of the calling instruction, for diagnostics
- copyNamespaces- if the item is an element node, this indicates whether its namespaces need to be copied. Values are- ReceiverOption.ALL_NAMESPACES; the default (0) means
- Throws:
- XPathException- if an error occurs
 
 - 
reportValidationErrorprotected void reportValidationError(ValidationFailure err, boolean issueComment, Location locationId) throws XPathException Report a validation error- Parameters:
- err- The validation exception
- issueComment- true if the validation error message is to be written as an XML comment to the result document
- locationId- identifies the location in the source document or stylesheet/query where the validation error was detected
- Throws:
- XPathException- if reporting the error fails
 
 - 
reportIfInvalidprotected void reportIfInvalid() throws ValidationException- Throws:
- ValidationException
 
 
- 
 
-