Class HTML40Emitter

    • Constructor Detail

      • HTML40Emitter

        public HTML40Emitter()
        Constructor
    • Method Detail

      • isHTMLElement

        protected boolean isHTMLElement​(NodeName name)
        Decide whether an element is "serialized as an HTML element" in the language of the 3.0 specification
        Specified by:
        isHTMLElement in class HTMLEmitter
        Parameters:
        name - the name of the element
        Returns:
        true if the element is to be serialized as an HTML element
      • openDocument

        protected void openDocument()
                             throws XPathException
        Description copied from class: XMLEmitter
        Do the real work of starting the document. This happens when the first content is written.
        Overrides:
        openDocument in class HTMLEmitter
        Throws:
        XPathException - if an error occurs opening the output file
      • startElement

        public void startElement​(NodeName elemName,
                                 SchemaType type,
                                 AttributeMap attributes,
                                 NamespaceMap namespaces,
                                 Location location,
                                 int properties)
                          throws XPathException
        Output element start tag
        Specified by:
        startElement in interface Receiver
        Overrides:
        startElement in class HTMLEmitter
        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
      • rejectControlCharacters

        protected boolean rejectControlCharacters()
        Ask whether control characters should be rejected: true for HTML4, false for HTML5
        Specified by:
        rejectControlCharacters in class HTMLEmitter
        Returns:
        true if control characters should be rejected