Package com.saxonica.ee.validate
Class LaxValidator
- java.lang.Object
-
- net.sf.saxon.event.SequenceReceiver
-
- net.sf.saxon.event.ProxyReceiver
-
- com.saxonica.ee.validate.ValidatingFilter
-
- com.saxonica.ee.validate.ContentValidator
-
- com.saxonica.ee.validate.LaxValidator
-
- All Implemented Interfaces:
javax.xml.transform.Result
,Receiver
- Direct Known Subclasses:
AnyTypeValidator
public class LaxValidator extends ContentValidator
This class performs lax validation on an element.
-
-
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 LaxValidator(Receiver next)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(java.lang.CharSequence chars, Location locationId, int properties)
Character dataContentValidator
getChildValidator()
Get a validator to handle the children of the current element.SchemaType
getSchemaType()
Get the schema type against which we are validating, if anyprotected AttributeInfo
processAttribute(AttributeInfo att)
Lax-validate an attributevoid
startElement(NodeName elemName, SchemaType type, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties)
Output element start tag for a child element-
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, endElement, 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
-
LaxValidator
public LaxValidator(Receiver next)
-
-
Method Detail
-
getSchemaType
public SchemaType getSchemaType()
Get the schema type against which we are validating, if any- Specified by:
getSchemaType
in classContentValidator
- Returns:
- the schema type that this validator is validating against, or null
-
startElement
public void startElement(NodeName elemName, SchemaType type, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) throws XPathException
Output element start tag for a child element- Specified by:
startElement
in interfaceReceiver
- Overrides:
startElement
in classContentValidator
- 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
-
getChildValidator
public ContentValidator getChildValidator()
Description copied from class:ContentValidator
Get a validator to handle the children of the current element. This is called immediately on return from the startElement call that starts this element.- Specified by:
getChildValidator
in classContentValidator
- Returns:
- the validator to be used to handle the children
-
processAttribute
protected AttributeInfo processAttribute(AttributeInfo att) throws XPathException
Lax-validate an attribute- Parameters:
att
- the attribute to be validated- Throws:
XPathException
-
characters
public void characters(java.lang.CharSequence chars, Location locationId, int properties) throws XPathException
Character data- Specified by:
characters
in interfaceReceiver
- Overrides:
characters
in classProxyReceiver
- Parameters:
chars
- The characterslocationId
- provides information such as line number and system ID.properties
- Bit significant value. The following bits are defined:- DISABLE_ESCAPING
- Disable escaping for this text node
- USE_CDATA
- Output as a CDATA section
- Throws:
XPathException
- if an error occurs
-
-