public class ValidatingFilter extends ProxyReceiver
Modifier and Type | Field and Description |
---|---|
protected boolean |
locallyInvalid |
nextReceiver
pipelineConfiguration, previousAtomic, systemId
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
Constructor and Description |
---|
ValidatingFilter(Receiver next) |
Modifier and Type | Method and Description |
---|---|
void |
append(Item item,
int 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(ValidationException err,
boolean issueComment,
int 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, getUnderlyingReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument, startElement
append, getConfiguration, getPipelineConfiguration, getSystemId
public ValidatingFilter(Receiver next)
public ValidationContext getValidationContext()
public void setValidationContext(ValidationContext validationContext)
validationContext
- public 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, int locationId, int copyNamespaces) throws XPathException
ProxyReceiver
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 NodeInfo.ALL_NAMESPACES
,
NodeInfo.LOCAL_NAMESPACES
, NodeInfo.NO_NAMESPACES
XPathException
- if the operation failsprotected void reportValidationError(ValidationException err, boolean issueComment, int 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-2013 Saxonica Limited. All rights reserved.