Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  Result, Receiver

    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.

Field Summary

Fields inherited from class com.saxonica.validate.ContentValidator
`NIL_ALLOWED, NIL_DISALLOWED, NIL_IGNORED`

Fields inherited from interface javax.xml.transform.Result
`PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING`

Constructor Summary
`EmptyContentValidator(UserComplexType type)`

Method Summary
`void` | `characters(CharSequence chars, int locationId, int properties)` Character data
`void` | `endElement()` End of element
`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.AttributeValidator
`attribute, setAttributeGroup, startContent`

Methods inherited from class com.saxonica.validate.ContentValidator
`endDocument, getContainingElement, getContainingElementLocationId, getElementDeclaration, getNamespaceResolver, getNillability, isInvalid, isNil, isOutput, makeValidator, makeValidator, setContainingElement, setElementDeclaration, setErrorCode, setIsOutput, setNamespaceResolver, setNillability, setXSIType`

Methods inherited from class net.sf.saxon.event.ProxyReceiver
`append, close, comment, getConfiguration, getDocumentLocator, getNamePool, getUnderlyingReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startDocument`

Methods inherited from class net.sf.saxon.event.SequenceReceiver
`getPipelineConfiguration, getSystemId`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EmptyContentValidator

    public EmptyContentValidator(UserComplexType type)
                          throws ValidationException

Throws:
  `ValidationException`

Method Detail

### 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.

### 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`
  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`

### characters

    public void characters(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 content
    `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` - Additional properties
  Throws:
    `XPathException` - If this element does not allow character data

### endElement

    public void endElement()
                    throws XPathException

  End of element

  Specified by:
    `endElement` in interface `Receiver`
  Overrides:
    `endElement` in class `ProxyReceiver`
  Throws:
    `XPathException`

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) Michael H. Kay. All rights reserved.