Class MathTagHandler
- java.lang.Object
-
- com.singularsys.extensions.mathml.parser.AbstractHandler
-
- com.singularsys.extensions.mathml.parser.MathTagHandler
-
- All Implemented Interfaces:
StartTagHandler
,TagHandler
public class MathTagHandler extends AbstractHandler implements StartTagHandler
Handles the <math> element. All children of this must evaluate to Node, and a list of these is obtainable through the getResults method.- Author:
- Richard Morris
-
-
Constructor Summary
Constructors Constructor Description MathTagHandler(Jep jep)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endDoc()
Called at the end of the document.java.util.List<Node>
getResults()
Returns all the nodesjava.lang.Object
handle(StackFrame frame, org.xml.sax.Locator loc)
Transform the element, called when a closing tag is encountered.boolean
isInMathTag()
void
setInMathTag(boolean inMathTag)
void
start(StackFrame frame, org.xml.sax.Locator loc)
Called when a starting tag is encountered.void
startDoc()
Called at the start of the document.-
Methods inherited from class com.singularsys.extensions.mathml.parser.AbstractHandler
convertChildrenToNodes, convertToNode, getFt, getJep, getNf, getNumf, getOt, jepNodesAsArray, jepNodesToFlatArray, jepNodesToFlatList
-
-
-
-
Constructor Detail
-
MathTagHandler
public MathTagHandler(Jep jep)
-
-
Method Detail
-
start
public void start(StackFrame frame, org.xml.sax.Locator loc) throws org.xml.sax.SAXParseException
Description copied from interface:StartTagHandler
Called when a starting tag is encountered.- Specified by:
start
in interfaceStartTagHandler
- Throws:
org.xml.sax.SAXParseException
-
handle
public java.lang.Object handle(StackFrame frame, org.xml.sax.Locator loc) throws org.xml.sax.SAXParseException
Description copied from interface:TagHandler
Transform the element, called when a closing tag is encountered.- Specified by:
handle
in interfaceTagHandler
- Parameters:
frame
- StackFrame representing the elementloc
- location in input- Returns:
- typically a Node, other types of objects may also be returned when the tag has a special meaning for its parent node.
- Throws:
org.xml.sax.SAXParseException
-
startDoc
public void startDoc()
Description copied from interface:StartTagHandler
Called at the start of the document.- Specified by:
startDoc
in interfaceStartTagHandler
-
endDoc
public void endDoc() throws org.xml.sax.SAXException
Description copied from interface:StartTagHandler
Called at the end of the document.- Specified by:
endDoc
in interfaceStartTagHandler
- Throws:
org.xml.sax.SAXException
-
getResults
public java.util.List<Node> getResults()
Returns all the nodes
-
isInMathTag
public boolean isInMathTag()
-
setInMathTag
public void setInMathTag(boolean inMathTag)
-
-