Class AnyTypeValidator

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

    public class AnyTypeValidator
    extends LaxValidator
    Validator to validate an element against the class xs:anyType
    • Constructor Detail

      • 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
    • Method Detail

      • startElement

        public void startElement​(NodeName elemName,
                                 SchemaType type,
                                 AttributeMap attributes,
                                 NamespaceMap namespaces,
                                 Location location,
                                 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:
        elemName - the name of the element.
        type - the type annotation of the element.
        attributes - the attributes of this element
        namespaces - the in-scope namespaces of this element: generally this is all the in-scope namespaces, without relying on inheriting namespaces from parent elements
        location - an object providing information about the module, line, and column where the node originated
        properties - bit-significant properties of the element node. If there are no relevant properties, zero is supplied. The definitions of the bits are in class ReceiverOption
        Throws:
        XPathException - if an error occurs
      • characters

        public void characters​(UnicodeString chars,
                               Location 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 content
        locationId - the location of the node in the source, or of the instruction that created it
        properties - Additional properties @throws XPathException If this element does not allow character data
        Throws:
        XPathException - if an error occurs