Class FunctionBuilder

java.lang.Object
com.singularsys.extensions.mathml.builder.ApplyConstructor
com.singularsys.extensions.mathml.builder.FunctionBuilder
All Implemented Interfaces:
MathMLFragmentBuilder

public class FunctionBuilder extends ApplyConstructor implements MathMLFragmentBuilder
Builds xml-fragments for jep functions. Most functions are converted to use the <apply> tag with the first child a specific mathml function element. For example sin(x) becomes <apply><sin/><ci>x</ci></apply> The functions map translate jep function name to MathML element names, and elements can be added using putFunction. Some functions like lg (base-2 log) have special behaviour implement by individual MathMLFragmentBuilder, special functions can be added using putSpecialFunction. Unknown functions are handled by the unknownFunctionBuilder, by default this throws an exception, but it can be configured to produce <csymbol> or <fn> elements.
Author:
Richard Morris