Creates a MathMLDocument with a minimal tree
containing only a MathMLMathElement corresponding to a MathML math
element. The MathMLMathElement is empty, having no child elements or non-default attributes; it is the
root element of the document, and is the element accessed via the documentElement attribute of
the MathMLDocument. Note that a MathMLDocument object should only be created for a
stand-alone MathML document.

Interface MathMLDocument

This interface extends the Document interface to
add access to document properties relating to navigation. The documentElement
attribute for a MathMLDocument should be the MathMLMathElement
representing the top-level math element
which is the root of the document.

The URI of the page that linked to this document, if
available. This is null if the user navigated directly to the page. If this
is not a stand-alone MathML document (e.g. is embedded in an XHTML document), this
may be retrieved from the parent Document if available.

The domain name of the server that served the document,
or null if the server cannot be identified by a domain name, or if it is not
available. If this is not a stand-alone MathML document (e.g. is embedded in an XHTML document),
this may be retrieved from the parent Document if available.

Interface MathMLNodeList

This interface is provided as a specialization of the NodeList interface.
The child Nodes of this NodeList must be MathMLElements or Text nodes.

Note that MathMLNodeLists are frequently used in the
DOM as values of readonly attributes, encapsulating, for instance,
various collections of child elements. When used in this way, these objects
are always understood to be live, in the sense that changes
to the document are immediately reflected in them.

The number of child elements of this element
which represent arguments of the element, as opposed to qualifiers or declare elements.
Thus for a MathMLContentContainer it does not contain elements representing bound variables, conditions,
separators, degrees, or upper or lower limits (bvar,
condition, sep,
degree, lowlimit,
or uplimit).

This attribute accesses the child MathMLElements of
this element which are arguments of it, as a MathMLNodeList. Note that this list does not
contain any MathMLElements representing qualifier elements or declare elements.

Provides access to the declare elements
which are children of this element, in a MathMLNodeList. All
Nodes in this list must be MathMLDeclareElements.

Methods

getArgument

This method returns the indexth child argument element of this
element. This frequently differs from the value ofNode::childNodes().item(index),
as qualifier elements and declare elements are not counted.

INDEX_SIZE_ERR: Raised if index is greater
than the number of child elements.

setArgument

This method sets newArgument as the
index-th argument of this element. If there is currently an
index-th argument, it is replaced by newArgument.
This frequently differs from setting the node atNode::childNodes().item(index),
as qualifier elements and declare elements are not counted.

The MathMLElement child of this
element that represents the new argument in the DOM.

Exceptions

DOMException

HIERARCHY_REQUEST_ERR: Raised if this element does not permit a child
element of the type of newArgument, if this is a MathMLContentContainer and newArgument
is a qualifier element, or if newElement is a MathMLDeclareElement.

INDEX_SIZE_ERR: Raised if index is greater than one more than the number
of child elements.

insertArgument

This method inserts newArgument before the
current index-th argument of this element. If index is 0, or if
index is one more than the current number of arguments, newArgument is
appended as the last argument. This frequently differs from setting the node atNode::childNodes().item(index), as qualifier elements and declare
elements are not counted.

The MathMLElement child of this
element that represents the new argument in the DOM.

Exceptions

DOMException

HIERARCHY_REQUEST_ERR: Raised if this element does not permit a child
argument of the type of newArgument, or, for MathMLContentContainers, if newArgument
represents a qualifier element.

INDEX_SIZE_ERR: Raised if index is greater than one more than the number of child
arguments.

deleteArgument

This method deletes the index-th
child element that is an argument of this element. Note that child elements
which are qualifier elements or declare elements are not counted
in determining the index-th argument.

Parameters

unsigned long

index

The one-based index of the argument to be deleted.

Return value

void

None.

Exceptions

DOMException

INDEX_SIZE_ERR: Raised if index is greater
than the number of child elements.

removeArgument

This method deletes the index-th
child element that is an argument of this element, and returns it to the caller.
Note that child elements that are qualifier elements or declare
elements are not counted in determining the index-th argument.

A MathMLDeclareElement to be
inserted as the index-th child declare element.

unsigned long

index

A one-based index into the list of
child declare elements of this element giving the
position into which newDeclaration is to be inserted. If index
is one more than the number of declare children
of this element, newDeclaration is appended as the last declare
child.

A MathMLDeclareElement to be inserted as the
index-th child declare element.

unsigned long

index

A one-based index into the list of
child declare elements of this element giving the
position before which newDeclaration is to be inserted. If index is 0
or if it is one more than the number of child declare children,
newDeclaration is appended as the last child declare element.

The MathMLDeclareElement child
of this element representing newDeclaration in the DOM.

Exceptions

DOMException

INDEX_SIZE_ERR: Raised if index is greater
than one more than the number of child declare elements.

HIERARCHY_REQUEST_ERR: Raised if this element does not permit child declare
elements.

removeDeclaration

This method removes the MathMLDeclareElement representing
the index-th declare child element of
this element, and returns it to the caller. Note that index
is the position in the list of declare element children,
as opposed to the position in the list of all child Nodes.

The MathMLDeclareElement being
removed as a child Node of this element.

Exceptions

DOMException

INDEX_SIZE_ERR: Raised if index is greater than
the number of child declare elements.

deleteDeclaration

This method deletes the MathMLDeclareElement representing
the index-th declare child element of
this element. Note that index is the position in the list of declare
element children, as opposed to the position in the list of all child Nodes.

Parameters

unsigned long

index

The one-based index of the declare
element to be removed.

Return value

void

None.

Exceptions

DOMException

INDEX_SIZE_ERR: Raised if index is greater than
the number of child declare elements.

Interface MathMLMathElement

It may become useful for interfacing between the Document Object Model objects
encoding an enclosing document and the MathML DOM elements that are its children.
It could also be used for some purposes as a MathML DOM surrogate for a Document object.
For instance, MathML-specific factory methods could be placed here, as could methods for creating MathML-specific Iterators or TreeWalkers.
However, this functionality is as yet undefined.

This method inserts newAnnotation before
the current index-th "alternate" content associated
with a semantics element. If index is 0,
newAnnotation is appended as the last annotation or annotation-xml child of this element.

The MathMLAnnotationElement or
MathMLXMLAnnotationElement child of this element that represents
the new annotation in the DOM.

Exceptions

DOMException

HIERARCHY_REQUEST_ERR: Raised if newAnnotation is not a
MathMLAnnotationElement or MathMLXMLAnnotationElement.

INDEX_SIZE_ERR: Raised if index is greater
than the current number of annotation or
annotation-xml children of this semantics element.

setAnnotation

This method allows setting or replacement of the
index-th "alternate" content associated with a
semantics element. If there is already an
annotation or annotation-xml
element with this index, it is replaced by newAnnotation.

D.1.3 Presentation Elements

Interface MathMLPresentationElement

This interface is provided to serve as a base interface for
various MathML Presentation interfaces. It contains no new attributes or
methods at this time; however, it is felt that the distinction between
Presentation and Content MathML entities should be indicated in the
MathMLElement hierarchy. In particular, future versions of the MathML DOM
may add functionality on this interface; it may also serve as an aid to
implementors.

Interface MathMLSpaceElement

This interface extends the MathMLPresentationElement
interface for the MathML space element mspace.
Note that this is not derived from MathMLPresentationToken,
despite the fact that mspace is classified as a token element,
since it does not carry the attributes declared for
MathMLPresentationToken.

D.1.3.2 Presentation Token Element Interfaces

Interface MathMLPresentationToken

This interface extends the MathMLElement interface to
include access for attributes specific to text presentation. It serves as
the base class for all MathML presentation token elements. Access to the
body of the element is via the nodeValue attribute
inherited from Node. Elements that expose only the core presentation
token attributes are directly supported by this object. These elements are:

Returns the child Nodes of the
element. These should consist only of Text nodes, MathMLGlyphElements,
and MathMLAlignMarkElements.J Should behave the same as the base class's
Node::childNodes attribute; however, it is provided here for clarity.

Interface MathMLPresentationContainer

This interface represents MathML Presentation elements that may
contain arbitrarily many child elements. Elements directly supported by this interface
include mrow, mphantom and merror.
All attributes and methods are derived from the base MathMLPresentationElement and MathMLContainer interfaces.

Interface MathMLStyleElement

This interface extends the MathMLElement interface for
the MathML style element mstyle.
While the mstyle element may contain any
attributes allowable on any MathML presentation element, only
attributes specific to the mstyle
element are included in the interface below. Other attributes should be
accessed using the methods on the base Element class, particularly
the Element::getAttribute and Element::setAttribute
methods, or even the Node::attributes attribute to access all of
them at once. Not only does this obviate a lengthy list below, but it seems
likely that most implementations will find this a considerably more useful
interface to a MathMLStyleElement.

Either "true" or "false" if
present; a string controlling whether underscript is drawn as an
"accent" or as a "limit", if specified; this is the
element's accentunder attribute. This must return
null for an mover.

Either "true" or "false" if
present; a string controlling whether overscript is drawn as an
"accent" or as a "limit", if specified; this is the
element's accent attribute. This must return
null for an munder.

A NodeList representing the prescripts of
the script, which appear in the order described by the expression
(prescript presuperscript)*. This is the same as traversing
the contents of the NodeList returned by
Node::childNodes() from the Node following the
<mprescripts/> (if present) to the end of the
list.

A MathMLNodeList representing the scripts of the
script, which appear in the order described by the expression (script
superscript)*. This is the same as traversing the contents of the
NodeList returned by Node::childNodes() from the first
Node up to and including the Node preceding the
<mprescripts/> (if present).

numprescriptcolumns of type
unsigned long, readonly

The number of script/subscript columns preceding (to the left of)
the base. Should always be half of
getprescripts().length()

numscriptcolumns of type
unsigned long, readonly

The number of script/subscript columns following (to the right
of) the base. Should always be half of
getscripts().length()

Methods

getPreSubScript

A convenience method to retrieve pre-subscript
children of the element, referenced by column index .

Returns the MathMLElement representing the
colIndex-th presubscript (to the left of the
base, counting from 1 at the far left). Note that this may be
the MathMLElement corresponding to the special element
<none/> in the case of a "missing"
presubscript (see the discussion of
mmultiscripts), or it may be null if
colIndex is out of range for the element.

This method raises no exceptions.

getSubScript

A convenience method to retrieve subscript
children of the element, referenced by column index.

Parameters

unsigned long

colIndex

Column index of script (where 1 represents the
leftmost script column, the first to the right
of the base).

Returns the MathMLElement representing the
colIndex-th subscript to the right of the
base. Note that this may be
the MathMLElement corresponding to the special element
<none/> in the case of a "missing"
subscript (see the discussion of
mmultiscripts), or it may be null if
colIndex is out of range for the element.

This method raises no exceptions.

getPreSuperScript

A convenience method to retrieve pre-superscript
children of the element, referenced by column index .

Returns the MathMLElement representing the
colIndex-th presuperscript (to the left of
the base, counting from 1 at the far left). Note that this may be
the MathMLElement corresponding to the special element
<none/> in the case of a "missing"
presuperscript (see the discussion of
mmultiscripts), or it may be null if
colIndex is out of range for the element.

This method raises no exceptions.

getSuperScript

A convenience method to retrieve superscript
children of the element, referenced by column index .

Parameters

unsigned long

colIndex

Column index of script (where 1 represents the
leftmost script column, the first to the right of the
base)

Returns the MathMLElement representing the
colIndex-th superscript to the right of the
base. Note that this may be
the MathMLElement corresponding to the special element
<none/> in the case of a "missing"
superscript (see the discussion of
mmultiscripts), or it may be null if
colIndex is out of range for the element.

This method raises no exceptions.

insertPreSubScriptBefore

A convenience method to insert a pre-subscript before the position referenced by column index. If
colIndex is 0, the new pre-subscript is appended
as the last pre-subscript of the mmultiscripts
element; if colIndex is 1, a new pre-subscript is
prepended at the far left.
Note that inserting a
new pre-subscript will cause the insertion of an empty
pre-superscript in the same column.

The MathMLElement child of this
MathMLMultiScriptsElement representing the new pre-subscript in
the DOM.

Exceptions

DOMException

HIERARCHY_REQUEST_ERR: Raised if newScript represents
an element that cannot be a pre-subscript.

INDEX_SIZE_ERR: Raised if colIndex is greater
than one more than the number of pre-scripts of the element.

insertSubScriptBefore

A convenience method to insert a subscript before the position referenced by column index. If
colIndex is 0, the new subscript is appended
as the last subscript of the mmultiscripts element; if colIndex is 1, a new subscript is prepended
at the far left. Note that inserting a new subscript will
cause the insertion of an empty superscript in the same column.

Parameters

unsigned long

colIndex

Column index of subscript, where 1 represents the leftmost script column (the
first to the right of the base).

The MathMLElement child of this
element representing the new subscript in the DOM.

Exceptions

DOMException

HIERARCHY_REQUEST_ERR: Raised if newScript represents
an element that cannot be a subscript.

INDEX_SIZE_ERR: Raised if colIndex is greater
than one more than the number of scripts of the element.

insertPreSuperScriptBefore

A convenience method to insert a pre-superscript before the position referenced by column index. If
colIndex is 0, the new pre-superscript is appended
as the last pre-superscript of the mmultiscripts element; if colIndex is 1, a new pre-superscript is prepended at the far left. Note that inserting a
new pre-superscript will cause the insertion of an empty
pre-subscript in the same column.

The MathMLElement child of this
element that represents the new pre-superscript in the DOM.

Exceptions

DOMException

HIERARCHY_REQUEST_ERR: Raised if newScript represents
an element that cannot be a pre-superscript.

INDEX_SIZE_ERR: Raised if colIndex is greater
than one more than the number of pre-scripts of the element.

insertSuperScriptBefore

A convenience method to insert a superscript before the position referenced by column index. If
colIndex is 0, the new superscript is appended
as the last superscript of the mmultiscripts element; if colIndex is 1, a new superscript is prepended
at the far left. Note that inserting a new superscript will
cause the insertion of an empty subscript in the same column.

Parameters

unsigned long

colIndex

Column index of superscript, where 1 represents the leftmost script column (the
first to the right of the base).

A string representing the vertical alignment of the table with
the adjacent text. Allowed values are
("top" |
"bottom" |
"center" |
"baseline" |
"axis")[rownumber],
where rownumber is between 1 and n (for a table with
n rows) or -1 and -n.

A string representing the alignment of entries in each
row, consisting of a space-separated sequence of alignment
specifiers, each of which can have the following values:
"top",
"bottom",
"center",
"baseline", or
"axis".

A string representing the alignment of entries in each
column, consisting of a space-separated sequence of alignment
specifiers, each of which can have the following values:
"left",
"center", or
"right".

A string specifying how the alignment groups within the cells
of each row are to be aligned with the corresponding items above or below them
in the same column. The string consists of a sequence of braced group
alignment lists. Each group alignment list is a space-separated
sequence, each of which can have the following values:
"left",
"right",
"center", or
"decimalpoint".

A string consisting of a space-separated sequence of
specifiers, each of which can have one of the following forms:
"auto",
number h-unit,
namedspace, or
"fit". (A value of the form namedspace is one
of "veryverythinmathspace", "verythinmathspace",
"thinmathspace", "mediummathspace",
"thickmathspace", "verythickmathspace", or
"veryverythickmathspace".) This represents the element's
columnwidth attribute.

A string specifying whether and what kind of lines should be
added between each row. The string consists of a
space-separated sequence of specifiers, each of which
can have the following values:
"none",
"solid", or
"dashed".

A string specifying whether and what kind of lines should be
added between each column. The string consists of a
space-separated sequence of specifiers, each of which
can have the following values:
"none",
"solid", or
"dashed".

A MathMLNodeList consisting
of MathMLTableRowElements and MathMLLabeledRowElements
representing the rows of the table. This is a live object.

Methods

insertEmptyRow

A convenience method to insert a new (empty)
row (mtr) in the table before the current index-th row. If index is less than 0, the new row is inserted
before the -index-th row counting up from the current last row; if
index is equal to the current number of rows, the new row is
appended as the last row.

Parameters

long

index

Position before which to insert the
new row, where 0 represents the first row. Negative numbers are used to
count backwards from the last row.

Returns the MathMLTableRowElement
child of this MathMLTableElement that represents the new
mtr element being inserted.

Exceptions

DOMException

INDEX_SIZE_ERR: Raised if index is greater
than the current number of rows of this mtable
element or less than minus this number.

insertEmptyLabeledRow

A convenience method to insert a new (empty)
labeled row (mlabeledtr) in the table before the
current index-th row. If index is less than 0, the new row
is inserted before the -index-th row counting up from the current
last row; if index is equal to the current number of rows, the new
row is appended as the last row.

Parameters

long

index

Position before which to insert the
new row, where 0 represents the first row. Negative numbers are used to
count backwards from the last row.

INDEX_SIZE_ERR: Raised if index is greater
than the current number of rows of this mtable
element or less than minus this number.

getRow

A convenience method to retrieve the index-th row
from the table. If index is less than 0, the -index-th row
from the bottom of the table is retrieved. (So, for instance, if index is -2, the next-to-last row is retrieved.) If index is not
a valid value (i.e. is greater than or equal to the number of rows, or is
less than minus the number of rows), a null MathMLTableRowElement is
returned.

Parameters

long

index

Index of the row to be returned, where
0 represents the first row. Negative numbers are used to count backwards
from the last row.

Returns the MathMLTableRowElement
representing the index-th row of the table.

This method raises no exceptions.

insertRow

A convenience method to insert the new row or
labeled row (mtr or mlabeledtr) represented by newRow in the table before the current index-th row. If index is equal to the current number of rows,
newRow is appended as the last row in the table. If index
is less than 0, the new row is inserted before the -index-th row
from the bottom of the table. (So, for instance, if index is -2,
the new row is inserted before the next-to-last current row.)

Parameters

long

index

Index before which to insert newRow, where 0 represents the first row. Negative numbers are used to count
backwards from the current last row.

The MathMLTableRowElement or
MathMLLabeledRowElement child of this MathMLTableElement representing the mtr element being inserted.

Exceptions

DOMException

HIERARCHY_REQUEST_ERR: Raised if newRow is not a
MathMLTableRowElement or MathMLLabeledRowElement.

INDEX_SIZE_ERR: Raised if index is greater
than the current number of rows or less than minus the current number of
rows of this mtable element.

setRow

A method to set the value of the row in the
table at the specified index to the mtr or
mlabeledtr represented by newRow. If index is less than 0, the -index-th row counting up from the
last is replaced by newRow; if index is one more than the
current number of rows, the new row is appended as the last row in the
table.

Parameters

long

index

Index of the row to be set to newRow, where 0 represents the first row. Negative numbers are used to
count backwards from the last row.

Returns the MathMLTableRowElement
or MathMLLabeledRowElement child of this element that represents
the new row in the DOM.

Exceptions

DOMException

HIERARCHY_REQUEST_ERR: Raised if newRow is not a
MathMLTableRowElement or MathMLLabeledRowElement.

INDEX_SIZE_ERR: Raised if index is greater
than the current number of rows of this mtable
element or less than minus this number.

deleteRow

A convenience method to delete the row of the
table at the specified index. If index is less than 0, the -index-th row from the bottom of the table is deleted. (So, for
instance, if index is -2, the next-to-last row is deleted.)

Parameters

long

index

Index of row to be deleted, where 0
represents the first row.

Return value

void

None.

Exceptions

DOMException

INDEX_SIZE_ERR: Raised if index is greater
than or equal to the current number of rows of this mtable element or less than minus this number.

removeRow

A convenience method to delete the row of the
table at the specified index and return it to the caller. If index
is less than 0, the -index-th row from the bottom of the table is
deleted. (So, for instance, if index is -2, the next-to-last
row is deleted.)

A string specifying how the alignment groups within the cells
of each row are to be aligned with the corresponding items above or below them
in the same column. The string consists of a sequence of braced group
alignment lists. Each group alignment list is a space-separated
sequence, each of which can have the following values:
"left",
"right",
"center", or
"decimalpoint".

A MathMLNodeList consisting of the cells of the
row. Note that this does not include the label if this is a
MathMLLabeledRowElement!

Methods

insertEmptyCell

A convenience method to insert a new (empty)
cell in the row.

Parameters

unsigned long

index

Index of the cell before which the new
cell is to be inserted, where the first cell is numbered 0. If index
is equal to the current number of cells, the new cell is appended as the
last cell of the row. Note that the index will differ from the index
of the corresponding Node in the collection returned by Node::childNodes if this is a MathMLLabeledRowElement!

A MathMLTableCellElement
representing the new cell (mtd element) to be
inserted.

unsigned long

index

Index of the cell before which the new
cell is to be inserted, where the first cell is numbered 0. If index
equals the current number of cells, the new cell is appended as the last
cell of the row. Note that the index will differ from the index of
the corresponding Node in Node::childNodes if this is a
MathMLLabeledRowElement!

A MathMLTableCellElement
representing the cell (mtd element) that is to be
inserted.

unsigned long

index

Index of the cell that is to be
replaced by the new cell, where the first cell is numbered 0. Note
that the index will differ from the index of the corresponding Node in the collection returned by Node::childNodes if this is a
MathMLLabeledRowElement!

A MathMLElement representing the
label of this row. Note that retrieving this should have the same effect as
a call to Node::getfirstChild(), while setting it should have the same effect
as Node::replaceChild(Node::getfirstChild()).

Exceptions on Setting

DOMException

NO_MODIFICATION_ALLOWED_ERR: Raised if this MathMLElement or the
new MathMLElement is read-only.

A string specifying how the alignment groups within the cell are
to be aligned with those in cells above or below this cell. The string
consists of a space-separated sequence of specifiers, each of which
can have the following values:
"left",
"right",
"center", or
"decimalpoint".

D.1.4 Content Elements

Interface MathMLContentElement

This interface is provided to serve as a base interface for
various MathML Content interfaces. It contains no new attributes or methods at this time;
however, it is felt that the distinction between Presentation and Content MathML entities
should be indicated in the MathMLElement hierarchy. In particular, future versions of
the MathML DOM may add functionality on this interface; it may also serve as an aid
to implementors.

IDL Definition

interface MathMLContentElement: MathMLElement {
};

D.1.4.1 Content Token Interfaces

Interface MathMLContentToken

This is the interface from which the interfaces representing
the MathML Content token elements (ci, cn and
csymbol) are derived. These elements may contain MathML Presentation
elements, Text nodes, or a combination of both. Thus the getArgument
and insertArgument methods have been provided to deal with this
distinction between these elements and other MathML Content elements.

The arguments of this element, returned as a MathMLNodeList.
Note that this is not necessarily the same as Node::childNodes, particularly
in the case of the cn element. The reason is that the sep
elements that are used to separate the arguments of a cn are
not returned.

A string describing the syntax in which the definition
located at definitionURL is given.

Methods

getArgument

A convenience method to retrieve the child
argument at the position referenced by index. Note that this is
not necessarily the same as the index-th child Node
of this Element; in particular, sep
elements will not be counted.

Parameters

unsigned long

index

Position of desired argument in the list
of arguments. The first argument is numbered 1.

Position before which newArgument
is to be inserted. The first argument is numbered 1.Note that this is
not necessarily the index of the Node in the list of child nodes,
as nodes representing such elements as sep are not
counted as arguments.

Position of the argument that is to be
set to newArgument in the list of arguments. The first argument
is numbered 1. Note that this is not necessarily the index of the
Node in the list of child nodes, as nodes representing such elements
as sep are not counted as arguments.

Interface MathMLCsymbolElement

This interface represents the csymbol
element. Although it currently has no attributes or methods distinct from those of MathMLContentToken,
a separate interface is provided to emphasize the conceptual role of the csymbol element.

IDL Definition

interface MathMLCsymbolElement: MathMLContentToken {
};

D.1.4.2 Content Container Interfaces

We have added interfaces for content elements that are containers,
i.e. elements that may contain child elements corresponding to arguments,
bound variables, conditions, or lower or upper limits.

This attribute represents the degree child
element of this node. This expresses, for instance, the degree of differentiation
if this element is a bvar child of an
apply element whose first child is a diff
or partialdiff. If this is an
apply element whose first child is a partialdiff,
the opDegree attribute, if present, represents the total degree of differentiation.
See Section 4.2.3.2 Operators taking Qualifiers.

Exceptions on Setting

DOMException

HIERARCHY_REQUEST_ERR: Raised if this element does not permit a child
degree element. In particular, raised if
this element is not a bvar or apply.

This attribute represents the domainofapplication child
element of this node, if present. This may express, for instance, the domain of integration
if this element is an apply element whose first child is an integral operator
(int). See Section 4.2.3.2 Operators taking Qualifiers.

Exceptions on Setting

DOMException

HIERARCHY_REQUEST_ERR: Raised if this element does not permit a child
domainofapplication element.

This attribute represents the momentabout child
element of this node, if present. This typically expresses the point about which a statistical
moment is to be calculated, if this element is an apply element whose
first child is a moment. See
Section 4.2.3.2 Operators taking Qualifiers.

Exceptions on Setting

DOMException

HIERARCHY_REQUEST_ERR: Raised if this element does not permit a child
momentabout element. In particular, raised if
this element is not an apply whose first child is a moment.

Methods

getBoundVariable

This method retrieves the index-th
MathMLBvarElement child of the MathMLElement. Note that
only bvar child elements are counted in determining
the index-th bound variable.

Parameters

unsigned long

index

The one-based index into the bound variable
children of this element of the MathMLBvarElement to
be retrieved.

The MathMLBvarElement representing
the index-th bvar child of this element.

This method raises no exceptions.

insertBoundVariable

This method inserts a MathMLBvarElement
as a child node before the current index-th bound variable child
of this MathMLElement. If index is 0, newBVar
is appended as the last bound variable child. This has the effect of adding
a bound variable to the expression this element represents. Note that the
new bound variable is inserted as the index-th bvar child node, not necessarily as the index-th child node.
The point of the method is to allow insertion of bound variables without
requiring the caller to calculate the exact order of child qualifier
elements.

HIERARCHY_REQUEST_ERR: Raised if this element does not permit child
bvar elements.

setBoundVariable

This method sets the index-th bound
variable child of this MathMLElement to newBVar. This
has the effect of setting a bound variable in the expression this element
represents. Note that the new bound variable is inserted as the index-th bvar child node, not necessarily
as the index-th child node. The point of the method is to allow
insertion of bound variables without requiring the caller to calculate the
exact order of child qualifier elements. If there is already a
bvar at the index-th position, it is
replaced by newBVar.

HIERARCHY_REQUEST_ERR: Raised if this element does not permit child
bvar elements.

deleteBoundVariable

This method deletes the index-th
MathMLBvarElement child of the MathMLElement. This has the
effect of removing this bound variable from the list of qualifiers
affecting the element this represents.

Parameters

unsigned long

index

The one-based index into the bound variable
children of this element of the MathMLBvarElement to
be removed.

Return value

void

None.

This method raises no exceptions.

removeBoundVariable

This method removes the index-th
MathMLBvarElement child of the MathMLElement and returns
it to the caller. This has the effect of removing this bound variable from
the list of qualifiers affecting the element this represents.

Parameters

unsigned long

index

The one-based index into the bound variable
children of this element of the MathMLBvarElement to
be removed.

HIERARCHY_REQUEST_ERR: Raised if this element does not permit a child
lowlimit element. In particular, raised if
this element is not an apply element whose first child
is an int, sum,
product, or limit element.

HIERARCHY_REQUEST_ERR: Raised if this element does not permit a child
uplimit element. In particular, raised if
this element is not an apply element whose first child
is an int, sum,
or product element.

Interface MathMLBvarElement

This interface represents the MathML bound variable
element bvar. The interface currently
provides no functionality beyond that of MathMLContentContainer,
but is useful for defining the type of bound variable access functions.

D.1.4.4 Other Content Element Interfaces

Interface MathMLIntervalElement

The interval element is used to represent
simple mathematical intervals on the real number line. It contains either two
child elements that evaluate to real numbers or one child element that is a
condition for defining membership in the interval.

Interface MathMLDeclareElement

The declare construct has two primary roles.
The first is to change or set the default attribute values for a specific
mathematical object. The second is to establish an association between a
"name" and an object.

A string indicating the type of the identifier. It must be compatible
with the type of the constructor, if a constructor is
present. The type is inferred from the constructor if present,
otherwise it must be specified.

nargs of type
unsigned long

If the identifier is a function, this attribute
specifies the number of arguments the function takes. This represents the
declare element's nargs attribute;
see Section 4.4.2.8 Declare (declare).

The MathMLContentElement component at
the position specified by index. If index is not a valid
index (i.e. is greater than the number of components of the vector or less
than 1), a null MathMLContentElement is returned.

This method raises no exceptions.

insertComponent

A convenience method to insert a new component
in the vector before the current index-th component. If index is 0 or is one more than the number of components currently in the
vector, newComponent is appended as the last component of the
vector.

Interface MathMLPiecewiseElement

The piecewise element represents
the piecewise definition of a function. It contains child piece elements, each
represented by a MathMLCaseElement, giving the various conditions and
associated function value specifications in the function definition, and
an optional otherwise child element, represented by a
MathMLContentElement, giving the "default" value of the
function - that is, the value to be assigned when none of the conditions specified in
the piece child elements hold.

A MathMLNodeList containing one MathMLCaseElement
representing each of the piece element children of this
MathMLPiecewiseElement. The otherwise
child (if present) is not contained in this MathMLNodeList.

Returns a MathMLContentElement representing the value
to be taken by the piecewise function when none of the conditions described in the
piece children is true.

Methods

getCase

A convenience method to retrieve the child piece
at the position referenced by index.

Parameters

unsigned long

index

Position of desired case in the list of cases.
The first piece is numbered 1; the otherwise
child (if present) is not counted, regardless of its position. If index is
greater than the number of pieces, a null MathMLCaseElement
is returned; no error is generated.

A convenience method to set the value of the child piece
at the position referenced by index to the value of case.

Parameters

unsigned long

index

Position of the piece to be set
to case. The first piece is numbered 1; the otherwise
child (if present) is not counted, regardless of its position. If there is currently
a piece at this position, it will be replaced by case.
If index is one more than the number of piece child elements,
a new one will be appended.

Interface MathMLCaseElement

The piece element represents
one of a sequence of cases used in the piecewise definition of a function. It contains two child
elements, each represented by a MathMLContentElement. The first child determines
the subset of the domain affected, normally by giving a condition to be satisfied. The second
gives the value of the function over the indicated subset of its domain.