com.saxonica.validate
Class EmptyContentValidator
java.lang.Object
net.sf.saxon.event.SequenceReceiver
net.sf.saxon.event.ProxyReceiver
com.saxonica.validate.ContentValidator
com.saxonica.validate.AttributeValidator
com.saxonica.validate.EmptyContentValidator
- All Implemented Interfaces:
- Receiver, javax.xml.transform.Result
- public class EmptyContentValidator
- extends AttributeValidator
This class is a filter that is used to validate that an element has empty content.
The element is allowed to have attributes, these are validated by the Validator
superclass.
Fields inherited from interface javax.xml.transform.Result |
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING |
Method Summary |
void |
characters(java.lang.CharSequence chars,
int locationId,
int properties)
Character data |
ContentValidator |
getChildValidator()
Get a validator to handle the children of the current element. |
void |
startElement(int nameCode,
int typeCode,
int locationId,
int properties)
Output element start tag (for a child of the element being validated) |
Methods inherited from class com.saxonica.validate.ContentValidator |
endDocument, getAnnotation, getContainingElement, getContainingElementLocationId, getContainingElementName, getElementDeclaration, getNamespaceResolver, isInvalid, isNillable, isOutput, makeValidator, makeValidator, makeValidator, reportValidationError, setAnnotation, setContainingElement, setElementDeclaration, setIsOutput, setNamespaceResolver, setNillable, setXSIType |
Methods inherited from class net.sf.saxon.event.ProxyReceiver |
close, comment, endElement, getConfiguration, getDocumentLocator, getNamePool, getSystemId, getUnderlyingReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startDocument |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EmptyContentValidator
public EmptyContentValidator(UserComplexType type)
throws ValidationException
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 class ContentValidator
startElement
public void startElement(int nameCode,
int typeCode,
int locationId,
int properties)
throws XPathException
- Output element start tag (for a child of the element being validated)
- Specified by:
startElement
in interface Receiver
- Overrides:
startElement
in class AttributeValidator
- Throws:
XPathException
characters
public void characters(java.lang.CharSequence chars,
int locationId,
int properties)
throws XPathException
- Character data
- Specified by:
characters
in interface Receiver
- Overrides:
characters
in class AttributeValidator
- Parameters:
chars
- The character contentproperties
- Additional properties
- Throws:
XPathException
- If this element does not allow character data