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

## com.saxonica.validate
Class AttributeValidator

    java.lang.Object
      net.sf.saxon.event.SequenceReceiver
          net.sf.saxon.event.ProxyReceiver
              com.saxonica.validate.ContentValidator
                  com.saxonica.validate.AttributeValidator

All Implemented Interfaces:
  Receiver, javax.xml.transform.Result

Direct Known Subclasses:
  AllElementValidator, ComplexContentValidator, EmptyContentValidator, SimpleContentValidator

public abstract class AttributeValidator
extends ContentValidator

This class is an abstract superclass for all the receivers that do element content validation. Since all kinds of element content can be associated with attributes, the attribute validation is handled at this level.

Field Summary
`protected boolean` | `nil`

Fields inherited from class com.saxonica.validate.ContentValidator
`invalid, pendingMessages, xsiType`

Fields inherited from class net.sf.saxon.event.ProxyReceiver
`nextReceiver, systemId`

Fields inherited from class net.sf.saxon.event.SequenceReceiver
`pipelineConfiguration, previousAtomic`

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

Constructor Summary
`AttributeValidator()`

Method Summary
`void` | `attribute(int nameCode, int typeCode, java.lang.CharSequence value, int locationId, int properties)` Handle an attribute
`void` | `characters(java.lang.CharSequence chars, int locationId, int properties)` Handle character data appearing as a child of the element being validated
`boolean` | `isNil()`
`void` | `setAttributeGroup(AttributeGroupDecl attributeGroup)` Identify the set of attributes permitted by the complex type being validated.
`void` | `startContent()` Notify the start of the content, that is, the completion of all attributes and namespaces.
`void` | `startElement(int nameCode, int 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, getChildValidator, 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 net.sf.saxon.event.SequenceReceiver
`append, getPipelineConfiguration`

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

Field Detail

### nil

    protected boolean nil

Constructor Detail

### AttributeValidator

    public AttributeValidator()

Method Detail

### isNil

    public boolean isNil()

### setAttributeGroup

    public void setAttributeGroup(AttributeGroupDecl attributeGroup)
                           throws ValidationException

  Identify the set of attributes permitted by the complex type being validated. This is called during initialization of the AttributeValidator. It is not called if the type is a simple type; in such cases any attribute is an error, except for the xsi: attributes permitted on all elements.

  Parameters:
    `attributeGroup` - the set of attributes declared for this complex type
  Throws:
    `ValidationException`

### attribute

    public void attribute(int nameCode,
                          int typeCode,
                          java.lang.CharSequence value,
                          int locationId,
                          int properties)
                   throws XPathException

  Handle an attribute

  Specified by:
    `attribute` in interface `Receiver`
  Overrides:
    `attribute` in class `ProxyReceiver`
  Parameters:
    `nameCode` - integer identifying the name of the attribute
    `typeCode` - integer identifying the type annotation (ignored)
    `value` - the value of the attribute
    `properties` - additional properties of the attribute
  Throws:
    `XPathException` - On any failure to write the attribute

### startElement

    public void startElement(int nameCode,
                             int 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 `ContentValidator`
  Throws:
    `XPathException`

### startContent

    public final void startContent()
                            throws XPathException

  Notify the start of the content, that is, the completion of all attributes and namespaces. The ValidationStack class is responsible for detecting this event and calling this method. Note that this event is reported for every element even if it has no attributes, no namespaces, and no content.

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

### characters

    public void characters(java.lang.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 `ProxyReceiver`
  Parameters:
    `chars` - The character content
    `properties` - Additional properties
  Throws:
    `XPathException` - If this element does not allow character data

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