Package org.jboss.elemento.mathml


package org.jboss.elemento.mathml
Provides support for creating and manipulating MathML (Mathematical Markup Language) elements using a fluent builder API.

Overview

This package enables creation of MathML elements for rendering mathematical notation in web applications. MathML elements are created using factory methods in the MathML class and follow the same fluent builder pattern as HTML elements in Elemento's core package.

Creating MathML Elements

Use the static methods in MathML to create MathML elements:

import static org.jboss.elemento.mathml.MathML.*;

// Create a MathML element
MathMLElement element = mathml()
        .add(mi().text("x"))
        .add(mo().text("="))
        .add(mn().text("42"))
        .element();

Builder API

The package provides two main builder types:

All builders support common operations through method interfaces like MathMLElementStyleMethods for style manipulation and standard builder methods for element configuration.

Element Creation

The MathML class provides factory methods for creating MathML elements:

MathML Namespace

All MathML elements are created in the MathML namespace (http://www.w3.org/1998/Math/MathML). The MathMLElement class defines this namespace constant and provides access to common MathML properties like className, dataset, displaystyle, style, and tabIndex.

See Also:
  • Class
    Description
     
    Builder for container-like SVG elements.
    All the MAthML DOM interfaces that correspond directly to elements in the SVG language derive from the SVGElement interface.
    Builder for simple SVG elements.
    Provides methods and default implementations for modifying MathML elements.