public class ValidatingFilter extends ProxyReceiver
Modifier and Type | Field and Description |
---|---|
protected boolean |
locallyInvalid |
nextReceiver
pipelineConfiguration, previousAtomic, systemId
Constructor and Description |
---|
ValidatingFilter(Receiver next) |
Modifier and Type | Method and Description |
---|---|
void |
append(Item item,
Location locationId,
int copyNamespaces)
Append an arbitrary item (node or atomic value) to the output
|
protected ConstraintChecker |
getConstraintChecker()
Get the constraint checker used in this pipeline
|
StartTagBufferEE |
getStartTagBuffer()
Get the startTagBuffer
|
ValidationContext |
getValidationContext()
Get the validation context for this validation episode
|
protected void |
reportIfInvalid() |
protected void |
reportValidationError(ValidationFailure err,
boolean issueComment,
Location locationId)
Report a validation error
|
void |
setConstraintChecker(ConstraintChecker checker)
Set the constraint checker used in this pipeline
|
void |
setStartTagBuffer(StartTagBufferEE 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
|
void |
setValidationContext(ValidationContext validationContext)
Set the validation context for this validation episode
|
boolean |
usesTypeAnnotations()
Ask whether this Receiver (or the downstream pipeline) makes any use of the type annotations
supplied on element and attribute events
|
attribute, characters, close, comment, endDocument, endElement, getNamePool, getNextReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument, startElement
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getPipelineConfiguration, getSystemId, handlesAppend
public ValidatingFilter(Receiver next)
public ValidationContext getValidationContext()
public void setValidationContext(ValidationContext validationContext)
validationContext
- the validation contextpublic void setConstraintChecker(ConstraintChecker checker)
checker
- the constraint checkerprotected ConstraintChecker getConstraintChecker()
public void setStartTagBuffer(StartTagBufferEE startTag)
startTag
- the namespace resolverpublic StartTagBufferEE getStartTagBuffer()
public boolean usesTypeAnnotations()
usesTypeAnnotations
in interface Receiver
usesTypeAnnotations
in class ProxyReceiver
public void append(Item item, Location locationId, int copyNamespaces) throws XPathException
ProxyReceiver
append
in interface Receiver
append
in class ProxyReceiver
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 are ReceiverOptions.ALL_NAMESPACES
,
ReceiverOptions.LOCAL_NAMESPACES
; the default (0) means
no namespacesXPathException
protected void reportValidationError(ValidationFailure err, boolean issueComment, Location locationId) throws XPathException
err
- The validation exceptionissueComment
- true if the validation error message is to be written as an XML comment to the
result documentlocationId
- identifies the location in the source document or stylesheet/query where the
validation error was detectedXPathException
- if reporting the error failsprotected void reportIfInvalid() throws ValidationException
ValidationException
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.