Package com.saxonica.ee.validate
Class AnyTypeValidator
- java.lang.Object
-
- All Implemented Interfaces:
javax.xml.transform.Result
,Receiver
public class AnyTypeValidator extends LaxValidator
Validator to validate an element against the class xs:anyType
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.saxonica.ee.validate.ContentValidator
ContentValidator.Nillability
-
-
Field Summary
-
Fields inherited from class com.saxonica.ee.validate.ContentValidator
childValidator, nilled, pendingMessages
-
Fields inherited from class net.sf.saxon.event.ProxyReceiver
nextReceiver
-
Fields inherited from class net.sf.saxon.event.SequenceReceiver
pipelineConfiguration, previousAtomic, systemId
-
-
Constructor Summary
Constructors Constructor Description AnyTypeValidator(ElementDecl elementDecl, Receiver next)
Create an AnyTypeValidator for a specific element declarationAnyTypeValidator(Receiver next)
Create an AnyTypeValidator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(UnicodeString chars, Location locationId, int properties)
Handle character data appearing as a child of the element being validatedvoid
endElement()
Validation at the end of the element 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-
Methods inherited from class com.saxonica.ee.validate.LaxValidator
getChildValidator, getSchemaType, processAttribute
-
Methods inherited from class com.saxonica.ee.validate.ContentValidator
checkNoCharactersWhenNil, checkNoChildrenWhenNil, endDocument, getAnnotation, getContainingElement, getContainingElementLocationId, getContainingElementName, getElementDeclaration, getNamespaceResolver, getNillability, isNilled, makeChildValidator, makeValidator, makeValidatorForType, setAnnotation, setContainingElement, setElementDeclaration, setNillability, setNilled, validateAttributes
-
Methods inherited from class com.saxonica.ee.validate.ValidatingFilter
append, getAttributeInheritor, getConstraintChecker, getValidationContext, reportIfInvalid, reportValidationError, setConstraintChecker, setStartTagBuffer, setValidationContext, usesTypeAnnotations
-
Methods inherited from class net.sf.saxon.event.ProxyReceiver
close, comment, getNamePool, getNextReceiver, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startDocument
-
Methods inherited from class net.sf.saxon.event.SequenceReceiver
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getPipelineConfiguration, getSystemId, handlesAppend
-
-
-
-
Constructor Detail
-
AnyTypeValidator
public AnyTypeValidator(Receiver next)
Create an AnyTypeValidator- Parameters:
next
- the next receiver in the pipeline
-
AnyTypeValidator
public AnyTypeValidator(ElementDecl elementDecl, Receiver next)
Create an AnyTypeValidator for a specific element declaration- Parameters:
elementDecl
- the element declaration. Ignored if null.next
- the next receiver in the pipeline
-
-
Method Detail
-
startElement
public void startElement(NodeName elemName, SchemaType type, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) throws XPathException
Handle the start tag for a child element of the element being validated- Specified by:
startElement
in interfaceReceiver
- Overrides:
startElement
in classLaxValidator
- Parameters:
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 classReceiverOption
- Throws:
XPathException
- if an error occurs
-
characters
public void characters(UnicodeString chars, Location locationId, int properties) throws XPathException
Handle character data appearing as a child of the element being validated- Specified by:
characters
in interfaceReceiver
- Overrides:
characters
in classLaxValidator
- Parameters:
chars
- The character contentlocationId
- the location of the node in the source, or of the instruction that created itproperties
- Additional properties @throws XPathException If this element does not allow character data- Throws:
XPathException
- if an error occurs
-
endElement
public void endElement() throws XPathException
Validation at the end of the element being validated. (Note this is a different element from the one passed to startElement).- Specified by:
endElement
in interfaceReceiver
- Overrides:
endElement
in classProxyReceiver
- Throws:
XPathException
- if the element is invalid
-
-