public class SimpleContentValidator extends AttributeValidator
childValidator, nil, NIL_ALLOWED, NIL_DISALLOWED, NIL_IGNORED, pendingMessageslocallyInvalidnextReceiverpipelineConfiguration, previousAtomic, systemIdPI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING| Constructor and Description |
|---|
SimpleContentValidator(ElementDecl declaration,
SchemaType type,
Receiver next)
Create a simple content validator
|
| Modifier and Type | Method and Description |
|---|---|
void |
characters(CharSequence chars,
int 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,
int locationId,
int properties)
Output element start tag (for a child of the element being validated)
|
attribute, getMostRecentAttributeType, noCharactersWhenNil, processWildcardTerm, setAttributeGroup, startContentendDocument, getAnnotation, getContainingElement, getContainingElementLocationId, getContainingElementName, getElementDeclaration, getNamespaceResolver, getNillability, isNil, makeChildValidator, makeValidator, makeValidatorForType, setAnnotation, setContainingElement, setElementDeclaration, setNillabilityappend, getConstraintChecker, getStartTagBuffer, getValidationContext, reportIfInvalid, reportValidationError, setConstraintChecker, setStartTagBuffer, setValidationContext, usesTypeAnnotationsclose, comment, getNamePool, getUnderlyingReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startDocumentappend, getConfiguration, getPipelineConfiguration, getSystemIdpublic SimpleContentValidator(ElementDecl declaration, SchemaType type, Receiver next) throws ValidationException
declaration - The element declaration (may be null). Used to check fixed/default valuestype - The schema type of the elementnext - The next receiver in the pipelineValidationException - if any failure occurspublic SchemaType getSchemaType()
getSchemaType in class ContentValidatorpublic void setSchemaType(SchemaType type) throws ValidationException
type - the schema typeValidationException - indicates a problem with the schemapublic void startElement(NodeName nameCode, SchemaType typeCode, int locationId, int properties) throws XPathException
startElement in interface ReceiverstartElement in class AttributeValidatornameCode - integer code identifying the name of the element within the name pool.typeCode - integer code identifying the element's type within the name pool.locationId - an integer which can be interpreted using a LocationProvider to return
information such as line number and system ID. If no location information is available,
the value zero is supplied.properties - properties of the element nodeXPathException - if an error occursprotected ContentValidator getChildValidator()
getChildValidator in class ContentValidatorpublic void characters(CharSequence chars, int locationId, int properties) throws XPathException
characters in interface Receivercharacters in class AttributeValidatorchars - The character contentproperties - Additional propertieslocationId - an integer which can be interpreted using a LocationProvider
to return information such as line number and system ID. If no location information is available,
the value zero is supplied.XPathException - If the character data is invalidpublic void endElement()
throws XPathException
endElement in interface ReceiverendElement in class ProxyReceiverXPathException - if an error occursCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.