fmrisc.Communication
Class MathML

java.lang.Object
  extended by fmrisc.Communication.MathML

public final class MathML
extends java.lang.Object

Conversion of AST to HTML/MathML presentation markup.


Constructor Summary
MathML(org.w3c.dom.Document document)
          Create converter that creates DOM nodes in the specified document.
 
Method Summary
 void appendDecl(org.w3c.dom.Node parent, Declaration object)
          Convert declaration to DOM representation of HTML/MathML markup.
 void appendExp(org.w3c.dom.Node parent, Expression exp)
          Convert expression to DOM representation of HTML/MathML markup.
 void appendIdentifier(org.w3c.dom.Node parent, Identifier object)
          Convert identifier to DOM representation of HTML/MathML markup.
 void appendPunctuation(org.w3c.dom.Node parent, java.lang.String text)
          Append to parent operator node with denoted text.
 void appendType(org.w3c.dom.Node parent, Type object)
          Convert type to DOM representation of HTML/MathML markup.
 void appendTypedIdentifier(org.w3c.dom.Node parent, TypedIdentifier object)
          Convert typed identifier to DOM representation of HTML/MathML markup.
static org.w3c.dom.Element createMathNode(org.w3c.dom.Document document)
          Create MathML node in document.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathML

public MathML(org.w3c.dom.Document document)
Create converter that creates DOM nodes in the specified document.

Parameters:
document - the document in which to create the DOM nodes.
Method Detail

createMathNode

public static org.w3c.dom.Element createMathNode(org.w3c.dom.Document document)
Create MathML node in document.

Parameters:
document - the document in which to create the node.
Returns:
the MathML node.

appendDecl

public void appendDecl(org.w3c.dom.Node parent,
                       Declaration object)
Convert declaration to DOM representation of HTML/MathML markup.

Parameters:
parent - the node to which the representation is appended.
object - the declaration to be converted.

appendType

public void appendType(org.w3c.dom.Node parent,
                       Type object)
Convert type to DOM representation of HTML/MathML markup.

Parameters:
parent - the node to which the representation is appended.
object - the type to be converted.

appendExp

public void appendExp(org.w3c.dom.Node parent,
                      Expression exp)
Convert expression to DOM representation of HTML/MathML markup.

Parameters:
parent - the node to which the representation is appended.
exp - the expression to convert.

appendPunctuation

public void appendPunctuation(org.w3c.dom.Node parent,
                              java.lang.String text)
Append to parent operator node with denoted text.

Parameters:
parent - the node to which the operator node is appended.
text - the text of the operator node.

appendIdentifier

public void appendIdentifier(org.w3c.dom.Node parent,
                             Identifier object)
Convert identifier to DOM representation of HTML/MathML markup.

Parameters:
parent - the node to which the representation is appended.
object - the identifier to be converted.

appendTypedIdentifier

public void appendTypedIdentifier(org.w3c.dom.Node parent,
                                  TypedIdentifier object)
Convert typed identifier to DOM representation of HTML/MathML markup.

Parameters:
parent - the node to which the representation is appended.
object - the typed identifier to be converted.