Class SpecialFunctionHandler

java.lang.Object
com.singularsys.extensions.mathml.parser.SpecialFunctionHandler
All Implemented Interfaces:
TagHandler
Direct Known Subclasses:
LogHandler, MinusHandler, RootHandler, SelectorHandler

public abstract class SpecialFunctionHandler extends Object implements TagHandler
Base class for functions and operators which have special arguments. For example <root> may have a <degree> element as its first child.
Author:
Richard Morris
  • Constructor Details

    • SpecialFunctionHandler

      public SpecialFunctionHandler()
  • Method Details

    • apply

      public abstract Node apply(ApplyHandler ah, StackFrame frame, Locator loc) throws SAXParseException, ParseException
      Called when closing <apply/> tag is encountered.
      Parameters:
      ah - a reference to the ApplyHandler which provides some useful methods.
      frame - the stackframe for the "apply" element, the children can be recovered from this
      loc - provides information on the location in the xml document.
      Returns:
      the resulting Node representing the function.
      Throws:
      SAXParseException
      ParseException
    • handle

      public Object handle(StackFrame frame, Locator loc)
      Returns 'this'.
      Specified by:
      handle in interface TagHandler
      Parameters:
      frame - StackFrame representing the element
      loc - 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.