Class LaxValidator

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

    public class LaxValidator
    extends ContentValidator
    This class performs lax validation on an element.
    • Constructor Detail

      • LaxValidator

        public LaxValidator​(Receiver next)
    • Method Detail

      • getSchemaType

        public SchemaType getSchemaType()
        Get the schema type against which we are validating, if any
        Specified by:
        getSchemaType in class ContentValidator
        the schema type that this validator is validating against, or null
      • startElement

        public void startElement​(NodeName elemName,
                                 SchemaType type,
                                 AttributeMap attributes,
                                 NamespaceMap namespaces,
                                 Location location,
                                 int properties)
                          throws XPathException
        Output element start tag for a child element
        Specified by:
        startElement in interface Receiver
        startElement in class ContentValidator
        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
        XPathException - if an error occurs
      • getChildValidator

        protected 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
        the validator to be used to handle the children
      • characters

        public void characters​(UnicodeString chars,
                               Location locationId,
                               int properties)
                        throws XPathException
        Character data
        Specified by:
        characters in interface Receiver
        characters in class ProxyReceiver
        chars - The characters
        locationId - provides information such as line number and system ID.
        properties - Bit significant value. The following bits are defined:
        Disable escaping for this text node
        Output as a CDATA section
        XPathException - if an error occurs