public class SimpleContentValidator extends AttributeValidator
ContentValidator.Nillability
childValidator, nil, pendingMessages
locallyInvalid
nextReceiver
pipelineConfiguration, previousAtomic, systemId
Constructor and Description |
---|
SimpleContentValidator(ElementDecl declaration,
SchemaType type,
Receiver next)
Create a simple content validator
|
Modifier and Type | Method and Description |
---|---|
void |
characters(java.lang.CharSequence chars,
Location locationId,
int properties)
Handle character data appearing as a child of the element being validated
|
void |
endElement()
End of element being validated
|
protected ContentValidator |
getChildValidator()
Return a validator to handle the children of the element just started.
|
SchemaType |
getSchemaType()
Get the schema type against which we are validating
|
void |
setSchemaType(SchemaType type)
Set the schema type against which this validator is to perform validation
|
void |
startElement(NodeName nameCode,
SchemaType typeCode,
Location location,
int properties)
Output element start tag (for a child of the element being validated)
|
attribute, getMostRecentAttributeType, processWildcardTerm, setAttributeGroup, startContent
checkNoCharactersWhenNil, checkNoChildrenWhenNil, endDocument, getAnnotation, getContainingElement, getContainingElementLocationId, getContainingElementName, getElementDeclaration, getNamespaceResolver, getNillability, isNil, makeChildValidator, makeValidator, makeValidatorForType, setAnnotation, setContainingElement, setElementDeclaration, setNillability
append, getConstraintChecker, getStartTagBuffer, getValidationContext, reportIfInvalid, reportValidationError, setConstraintChecker, setStartTagBuffer, setValidationContext, usesTypeAnnotations
close, comment, getNamePool, getNextReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startDocument
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getPipelineConfiguration, getSystemId, handlesAppend
public SimpleContentValidator(ElementDecl declaration, SchemaType type, Receiver next) throws MissingComponentException
declaration
- The element declaration (may be null). Used to check fixed/default valuestype
- The schema type of the elementnext
- The next receiver in the pipelineMissingComponentException
- if a validator cannot be constructed because the schema is incompletepublic SchemaType getSchemaType()
getSchemaType
in class ContentValidator
public void setSchemaType(SchemaType type) throws MissingComponentException
type
- the schema typeMissingComponentException
- if an unresolved reference is presentpublic void startElement(NodeName nameCode, SchemaType typeCode, Location location, int properties) throws XPathException
startElement
in interface Receiver
startElement
in class AttributeValidator
nameCode
- integer code identifying the name of the element within the name pool.typeCode
- the element's type annotation.location
- a location associated with the event (typically either a location in the
source document or the stylesheet)properties
- properties of the element nodeXPathException
- if an error occursprotected ContentValidator getChildValidator()
getChildValidator
in class ContentValidator
public void characters(java.lang.CharSequence chars, Location locationId, int properties) throws XPathException
characters
in interface Receiver
characters
in class AttributeValidator
chars
- The character contentlocationId
- the location of the node in the source, or of the instruction that created itproperties
- Additional properties @throws net.sf.saxon.trans.XPathException
If the character data is invalidXPathException
- if an error occurspublic void endElement() throws XPathException
endElement
in interface Receiver
endElement
in class ProxyReceiver
XPathException
- if an error occursCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.