Interface MathMLDocumentBuilder

  • All Known Implementing Classes:
    MathMLContentBuilder

    public interface MathMLDocumentBuilder
    Interface defining methods of the main builder class which can be used by individual MathMLFragmentBuilder fragment builders.
    Author:
    Richard Morris
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.w3c.dom.Element buildChild​(Node n, org.w3c.dom.Document d)
      Call back function to build a child node.
      org.w3c.dom.Element createElement​(java.lang.String name, org.w3c.dom.Document doc)
      Create an element, if namespacePrefix is set then MathML namespace will be used.
      void setAttribute​(org.w3c.dom.Element e, java.lang.String name, java.lang.String value)
      Sets an element attribute using namespaces if required.
    • Method Detail

      • buildChild

        org.w3c.dom.Element buildChild​(Node n,
                                       org.w3c.dom.Document d)
                                throws JepException
        Call back function to build a child node.
        Parameters:
        n - jep node to build
        d - document to create elements in
        Returns:
        element representing the node
        Throws:
        JepException
      • createElement

        org.w3c.dom.Element createElement​(java.lang.String name,
                                          org.w3c.dom.Document doc)
        Create an element, if namespacePrefix is set then MathML namespace will be used.
        Parameters:
        name - local name of element without prefix.
        doc - document to create an element in.
        Returns:
        a new Element
      • setAttribute

        void setAttribute​(org.w3c.dom.Element e,
                          java.lang.String name,
                          java.lang.String value)
        Sets an element attribute using namespaces if required. If namespacePrefix is set then MathML namespace will be used and Element.setAttributeNS is called.
        Parameters:
        e - element to set an attribut of
        name - name of attribute
        value - value of attribute