com.saxonica.validate
Class AnyTypeValidator
java.lang.Object
net.sf.saxon.event.SequenceReceiver
net.sf.saxon.event.ProxyReceiver
com.saxonica.validate.ValidatingFilter
com.saxonica.validate.ContentValidator
com.saxonica.validate.LaxValidator
com.saxonica.validate.AnyTypeValidator
- All Implemented Interfaces:
- Result, Receiver
public class AnyTypeValidator
- extends LaxValidator
Validator to validate an element against the class xs:anyType
Method Summary |
void |
characters(CharSequence chars,
int locationId,
int properties)
Handle character data appearing as a child of the element being validated |
void |
endElement()
Validation at the end of the element being validated. |
void |
startElement(NodeName nameCode,
SchemaType typeCode,
int locationId,
int properties)
Handle the start tag for a child element of the element being validated |
Methods inherited from class com.saxonica.validate.ContentValidator |
endDocument, getAnnotation, getConstraintChecker, getContainingElement, getContainingElementLocationId, getContainingElementName, getElementDeclaration, getNamespaceResolver, getNillability, getStartTagBuffer, isNil, makeValidator, makeValidatorForType, setAnnotation, setConstraintChecker, setContainingElement, setElementDeclaration, setNillability, setStartTagBuffer, setXSIType |
Methods inherited from class net.sf.saxon.event.ProxyReceiver |
close, comment, getNamePool, getUnderlyingReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
startElement
public void startElement(NodeName nameCode,
SchemaType typeCode,
int locationId,
int properties)
throws XPathException
- Handle the start tag for a child element of the element being validated
- Specified by:
startElement
in interface Receiver
- Overrides:
startElement
in class LaxValidator
- Parameters:
nameCode
- 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 node
- Throws:
XPathException
- if an error occurs
characters
public void characters(CharSequence chars,
int locationId,
int properties)
throws XPathException
- Handle character data appearing as a child of the element being validated
- Specified by:
characters
in interface Receiver
- Overrides:
characters
in class LaxValidator
- Parameters:
chars
- 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.
- Throws:
XPathException
- If this element does not allow character data
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 interface Receiver
- Overrides:
endElement
in class ProxyReceiver
- Throws:
XPathException
- if the element is invalid
Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.