public abstract class AttributeValidator extends ContentValidator
ContentValidator.Nillability
childValidator, nilled, pendingMessages
nextReceiver
pipelineConfiguration, previousAtomic, systemId
Constructor and Description |
---|
AttributeValidator(Receiver next)
Create an AttributeValidator
|
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
|
SimpleType |
getMostRecentAttributeType()
Get the SimpleType used for validating the most recent attribute, if any
|
protected SchemaType |
processWildcardTerm(Wildcard card,
NodeName elementName,
Location locationId)
Process a wildcard term found in complex content or "all" content groups.
|
void |
setAttributeGroup(AttributeGroupDecl attributeGroup)
Identify the set of attributes permitted by the complex type being validated.
|
void |
startElement(NodeName elemName,
SchemaType type,
AttributeMap attributes,
NamespaceMap namespaces,
Location location,
int properties)
Handle the start tag for a child element of the element being validated
|
AttributeMap |
validateAttributes(AttributeMap in,
java.util.List<NamespaceBinding> additionalNamespaces)
Handle the attributes
|
checkNoCharactersWhenNil, checkNoChildrenWhenNil, endDocument, getAnnotation, getChildValidator, getContainingElement, getContainingElementLocationId, getContainingElementName, getElementDeclaration, getNamespaceResolver, getNillability, getSchemaType, isNilled, makeChildValidator, makeValidator, makeValidatorForType, setAnnotation, setContainingElement, setElementDeclaration, setNillability, setNilled
append, getAttributeInheritor, getConstraintChecker, getValidationContext, reportIfInvalid, reportValidationError, setConstraintChecker, setStartTagBuffer, setValidationContext, usesTypeAnnotations
close, comment, endElement, getNamePool, getNextReceiver, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startDocument
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getPipelineConfiguration, getSystemId, handlesAppend
public AttributeValidator(Receiver next)
next
- the next receiver in the pipelinepublic void setAttributeGroup(AttributeGroupDecl attributeGroup)
attributeGroup
- the set of attributes declared for this complex typeMissingComponentException
- if an unresolved reference is foundpublic AttributeMap validateAttributes(AttributeMap in, java.util.List<NamespaceBinding> additionalNamespaces) throws XPathException
validateAttributes
in class ContentValidator
in
- the supplied attribute collectionadditionalNamespaces
- a mutable list to which additional namespace bindings can be added
in the event that validation of attributes requires new namespaces
(to support fixed or default values of QName-valued attributes)XPathException
public SimpleType getMostRecentAttributeType()
public void startElement(NodeName elemName, SchemaType type, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) throws XPathException
startElement
in interface Receiver
startElement
in class ContentValidator
elemName
- the name of the element.type
- the type annotation of the element.attributes
- the attributes of this elementnamespaces
- the in-scope namespaces of this element: generally this is all the in-scope
namespaces, without relying on inheriting namespaces from parent elementslocation
- an object providing information about the module, line, and column where the node originatedproperties
- bit-significant properties of the element node. If there are no relevant
properties, zero is supplied. The definitions of the bits are in class ReceiverOption
XPathException
- if an error occurspublic void characters(java.lang.CharSequence chars, Location locationId, int properties) throws XPathException
characters
in interface Receiver
characters
in class ProxyReceiver
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.XPathExceptionXPathException
- if an error occursprotected SchemaType processWildcardTerm(Wildcard card, NodeName elementName, Location locationId) throws XPathException
card
- the Wildcard that has been matchedelementName
- the name of the child elementlocationId
- the location of the child elementXPathException
- if the content is invalidCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.