E. Document Object Model for MathML (Non-Normative)

Mathematical Markup Language (MathML) Version 2.0
D Content Element Definitions
E Document Object Model for MathML (Non-normative)
E.1 IDL Interfaces
   E.1.1 Miscellaneous Object Definitions
   E.1.2 Generic MathML Elements
   E.1.3 Specific Style Methods (currfontsize, etc.)
   E.1.4 Presentation Elements
   E.1.5 Content Elements
F Glossary (Non-normative)

The following sections describe the interfaces that have been defined in the Document Object Model for MathML. Please refer to chapter 8 [Document Object Model for MathML] for more information.

E.1. IDL Interfaces

E.1.1. Miscellaneous Object Definitions

Interface MathMLCollection

IDL Definition

interface MathMLCollection {
  readonly attribute unsigned long length;
  Node item(in unsigned long index);
  Node namedItem(in DOMString name);
};

This interface is included by analogy with the interface HTMLCollection, and for the same reasons. (Specifically, it allows access to a list of nodes either by index or by name or id attributes. The rationale making this desirable for the HTML DOM applies also to the MathML DOM; particularly the presence of named hyperlink targets.) The documentation below is essentially copied from the definition of HTMLCollection.

Attributes

length

This attribute specifies the length or size of the list.

Methods

item

This method retrieves a node specified by ordinal index. Nodes are numbered in tree order (depth-first traversal order).

Parameters

index

The index of the node to be fetched. The index origin is 0.

Return value

The Node at the corresponding position upon success. A value of null is returned if the index is out of range.

This method raises no exceptions.

namedItem

This method retrieves a Node using a name. It first searches for a Node with a matching id attribute. If it doesn't find one, it then searches for a Node with a matching name attribute, but only on those elements that are allowed a name attribute.

Parameters

name

The name of the Node to be fetched.

Return value

The Node with a name or id attribute whose value corresponds to the specified string. Upon failure (e.g., no node with this name exists), returns null.

This method raises no exceptions.

E.1.2. Generic MathML Elements

Interface MathMLElement

IDL Definition

interface MathMLElement: Element {
  attribute DOMString className;
  attribute DOMString style;
  attribute DOMString id;
  attribute DOMString other;
  attribute NamedNodeMap otherAttributes;
  MathMLElement getMathElement(in unsigned long index);
};

All MathML element interfaces derive from this object, which derives from the basic DOM interface Element.

Attributes

className

The class attribute of the element. See the MathML discussion and the HTML definition of the class attribute.

style

A string identifying the element's style attribute.(?)

id

The element's identifier. See the MathML discussion and the HTML definition of the id attribute.

other

Direct access to the element's other attribute, as a string.

otherAttributes

This attribute retrieves or sets a NamedNodeList representing the contents of the element's other attribute. This will allow more convenient access to the name-key pairs which this attribute is defined to contain.

Methods

getMathElement

A convenience method to retrieve child elements.

Parameters

index

Return value

The same value as a call to Node::childNodes().item(index),but returned as a MathMLElement instead of a Node.

This method raises no exceptions.

E.1.3. Specific Style Methods (currfontsize, etc.)

Issue (style-methods): At the August 1999/ F2F meeting, the group agreed that the following level 2 interface for obtaining the current values of certain style attributes should be included. However, after careful study of the XML DOM levels 1 and 2, we (Roger and Ron) now believe that they are not appropriate. These methods are considered desirable because we see the need to make frequent calls to discover style information and the current script level and display style. As anyone who's implemented math rendering knows, there's a constant need for this information, and it must be obtained very quickly. The July 1999 DOM Level 2 draft states that mechanisms for obtaining the cascaded, computed and actual style for a specific element are being considered. This would obviate the need for the font and color methods. Why do we believe now that these interfaces should not be specified here? The primary reason is that the XML DOM, at both levels, does not include methods for obtaining these values. If they are introduced in some later iteration of the XML DOM, the font methods would not be necessary here. It would then be appropriate to include the currscriptlevel and currdisplaystyle methods in the MathML DOM. If we include the style related methods because they are necessary for a renderer implementation, it seems equally appropriate to include methods for returning the actual size of elements as rendered (these are the currheight, currdepth, and currwidth methods below). This information is also essential for rendering, and it is necessary for hit detection. We've concluded that the XML DOM assumes a model where the renderer itself implements methods to obtain the cascaded, computed style values, and the size and placement of objects. The inclusion of mouse events in the level 2 DOM without including these style, size, and placement methods emphasizes this implied model. The parallel for MathML would be to assume that a renderer that includes a MathML component would implement its own methods for obtaining the current script level, display style, and other inherited computed values that are essential for MathML rendering, and so these methods would not be specified here.

Interface MathMLElement2

IDL Definition

interface MathMLElement2: MathMLElement {
  readonly attribute DOMString currscriptlevel;
  readonly attribute DOMString currdisplaystyle;
  readonly attribute DOMString currfontsize;
  readonly attribute DOMString currfontweight;
  readonly attribute DOMString currfontstyle;
  readonly attribute DOMString currfontfamily;
  readonly attribute DOMString currcolor;
  readonly attribute DOMString currheight;
  readonly attribute DOMString currdepth;
  readonly attribute DOMString currwidth;
  DOMString getCurrScriptLevel();
  DOMString getCurrDisplayStyle();
  DOMString getCurrFontSize();
  DOMString getCurrFontWeight();
  DOMString getCurrFontStyle();
  DOMString getCurrFontFamily();
  DOMString getCurrColor();
};

This interface is required for implementations that perform rendering. Note that these methods are specified for MathMLElement. This means that they return results for all MathML elements, including content elements. This is to facilitate rendering of mixed markup.

DOM implementations that do not render should not have to implement the MathMLElement2 interface. In fact, they may not have the information necessary to implement them.

If IDL attributes are to be used only for explicit XML attributes, the above interface should use methods for getting current (cascaded, computed, and actual) values. They would take the following form.

DOMString getCurrScriptLevel();
DOMString getCurrDisplayStyle();
DOMString getCurrFontSize();
DOMString getCurrFontWeight();
DOMString getCurrFontStyle();
DOMString getCurrFontFamily();
DOMString getCurrColor();

Question: How does a DOM handle multiple clients? These style methods could return different values for different clients.

Attributes

currscriptlevel

Computes and returns the current script level. This is the cascaded, computed value for the element.

currdisplaystyle

Computes and returns the current display style. This is the cascaded, computed value for the element.

currfontsize

Computes and returns the current font size.  This is the cascaded, computed value for the element.

currfontweight

Computes and returns the current font weight.  This is the cascaded, computed value for the element.

currfontstyle

Computes and returns the current font style.  This is the cascaded, computed value for the element.

currfontfamily

Computes and returns the current font family.  This is the cascaded, computed value for the element.

currcolor

Computes and returns the current text color.  This is the cascaded, computed value for the element.

currheight

Computes and returns the current element height, relative to its baseline origin, as rendered.

currdepth

Computes and returns the current element depth, relative to its baseline origin, as rendered.

currwidth

Computes and returns the current element width as rendered.

Methods

getCurrScriptLevel

Return value

This method raises no exceptions.

getCurrDisplayStyle

Return value

This method raises no exceptions.

getCurrFontSize

Return value

This method raises no exceptions.

getCurrFontWeight

Return value

This method raises no exceptions.

getCurrFontStyle

Return value

This method raises no exceptions.

getCurrFontFamily

Return value

This method raises no exceptions.

getCurrColor

Return value

This method raises no exceptions.

E.1.4. Presentation Elements

Interface MathMLTokenElement

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 which expose only the core presentation token attributes are directly supported by this object. These elements are:

mi
MathML identifier element
mn
MathML number element
mtext
MathML text element

Issue (methodless-interfaces): Interfaces with no Methods? Should we provide interfaces with no methods for <mi>, <mn>, and <mtext>? This would provide separate objects for these elements. Since the element name provides complete information, there is no pressing need for such `interfaces'. Of course, extending this argument could lead to no MathML DOM specification at all.

IDL Definition

interface MathMLTokenElement: MathMLElement {
  attribute DOMString fontsize;
  attribute DOMString fontweight;
  attribute DOMString fontstyle;
  attribute DOMString fontfamily;
  attribute DOMString color;
};

Attributes

fontsize

The font size attribute for the element, if specified.

fontweight

The font weight attribute for the element, if specified.

fontstyle

The font style attribute for the element, if specified.

fontfamily

The font family attribute for the element, if specified.

color

The color attribute for the element, if specified.

Interface MathMLOperatorElement

IDL Definition

interface MathMLOperatorElement: MathMLTokenElement {
  attribute DOMString form;
  attribute DOMString fence;
  attribute DOMString separator;
  attribute DOMString lspace;
  attribute DOMString rspace;
  attribute DOMString stretchy;
  attribute DOMString symmetric;
  attribute DOMString maxsize;
  attribute DOMString minsize;
  attribute DOMString largeop;
  attribute DOMString moveablelimits;
  attribute DOMString accent;
};

This interface extends the MathMLTokenElement interface for the MathML operator element <mo>.

Attributes

form

The form attribute (prefix, infix or postfix) for the <mo> element, if specified.

fence

The fence attribute (true or false) for the <mo> element, if specified.

separator

The separator attribute (true or false) for the <mo> element, if specified.

lspace

The lspace attribute (spacing to left) of the <mo> element, if specified.

rspace

The rspace attribute (spacing to right) of the <mo> element, if specified.

stretchy

The stretchy attribute (true or false) for the <mo> element, if specified.

symmetric

The symmetric attribute (true or false) for the <mo> element, if specified.

maxsize

The maxsize attribute for the <mo> element, if specified.

minsize

The minsize attribute for the <mo> element, if specified.

largeop

The largeop attribute for the <mo> element, if specified.

moveablelimits

The moveablelimits (true or false) attribute for the <mo> element, if specified.

accent

The accent attribute (true or false) for the <mo> element, if specified.

Issue (default-values): Level 2, Default Values, and the Operator Dictionary In Scientific WorkPlace and Scientific Notebook, we use knowledge of fence delimiters at certain times to aid in conversion from presentation to content form. Knowledge of form attribute values could be used for conversions of this type. It's conceivable that other <mo> attributes might also give valuable clues. Some elements have default attribute values - for example, <mfence> has default delimiters. Do we expect renderers and content manipulators to manage their own operator dictionaries and to know the default values, or is it reasonable to ask the DOM to supply the affected attribute values? It seems unreasonable to expect all DOM implementations to use an operator dictionary - those dealing exclusively with content form won't want to be burdened this way. With these considerations in mind, we propose the following optional interface that supplies all operator attribute values, whether or not they have appear explicitly in the markup. Note that the interface uses IDL attributes (instead of Get methods) because the values can be supplied explicitly. We have specified this interface for the operator dictionary only. That is, we expect all clients of the DOM to know the default values of attributes for all elements. We've used the prefix `resolved' here. Any better suggestions?

Interface MathMLOperatorElement2

IDL Definition

interface MathMLOperatorElement2: MathMLOperatorElement {
  readonly attribute DOMString resolvedform;
  readonly attribute DOMString resolvedfence;
  readonly attribute DOMString resolvedseparator;
  readonly attribute DOMString resolvedlspace;
  readonly attribute DOMString resolvedrspace;
  readonly attribute DOMString resolvedstretchy;
  readonly attribute DOMString resolvedsymmetric;
  readonly attribute DOMString resolvedmaxsize;
  readonly attribute DOMString resolvedminsize;
  readonly attribute DOMString resolvedlargeop;
  readonly attribute DOMString resolvedmoveablelimits;
  readonly attribute DOMString resolvedaccent;
};

This interface extends the MathMLOperator interface to provide values for all attributes. Values that are not explicit would normally be obtained from an operator dictionary.

Attributes

resolvedform

The form attribute (prefix, infix or postfix) for the <mo> element, from the operator dictionary if not explicit.

resolvedfence

The fence attribute (true or false) for the <mo> element, from the operator dictionary if not explicit.

resolvedseparator

The separator attribute (true or false) for the <mo> element, from the operator dictionary if not explicit.

resolvedlspace

The lspace attribute (spacing to left) of the <mo> element, from the operator dictionary if not explicit.

resolvedrspace

The rspace attribute (spacing to right) of the <mo> element, from the operator dictionary if not explicit.

resolvedstretchy

The stretchy attribute (true or false) for the <mo> element, from the operator dictionary if not explicit.

resolvedsymmetric

The symmetric attribute (true or false) for the <mo> element, from the operator dictionary if not explicit.

resolvedmaxsize

The maxsize attribute for the <mo> element, from the operator dictionary if not explicit.

resolvedminsize

The minsize attribute for the <mo> element, from the operator dictionary if not explicit.

resolvedlargeop

The largeop attribute for the <mo> element, from the operator dictionary if not explicit.

resolvedmoveablelimits

The moveablelimits (true or false) attribute for the <mo> element, from the operator dictionary if not explicit.

resolvedaccent

The accent attribute (true or false) for the <mo> element, from the operator dictionary if not explicit.

Interface MathMLSpaceElement

IDL Definition

interface MathMLSpaceElement: MathMLElement {
  attribute DOMString width;
  attribute DOMString height;
  attribute DOMString depth;
};

This interface extends the MathMLElement interface for the MathML space element <mspace>. Note that this is not derived from MathMLTokenElement, despite the fact that <mspace> is classified as a token element, it doesn't carry the attributes declared for MathMLTokenElement.

Attributes

width

A string of the form `number h-unit'; represents the width attribute for the <mspace> element, if specified.

height

A string of the form `number v-unit'; represents the height attribute for the <mspace> element, if specified.

depth

A string of the form `number v-unit'; represents the depth attribute for the <mspace> element, if specified.

Interface MathMLStringLitElement

IDL Definition

interface MathMLStringLitElement: MathMLTokenElement {
  attribute DOMString lquote;
  attribute DOMString rquote;
};

This interface extends the MathMLTokenElement interface for the MathML string literal element <ms>.

Attributes

lquote

A string giving the opening delimiter for the string literal; represents the lquote attribute for the <ms> element, if specified.

rquote

A string giving the closing delimiter for the string literal; represents the rquote attribute for the <ms> element, if specified.

Interface MathMLFractionElement

IDL Definition

interface MathMLFractionElement: MathMLElement {
  attribute DOMString linethickness;
  attribute MathMLElement numerator;
  attribute MathMLElement denominator;
};

This interface extends the MathMLElement interface for the MathML fraction element <mfrac>.

Attributes

linethickness

A string representing the linethickness attribute of the <mfrac>, if specified.

numerator

The first child MathMLElement of the MathMLFractionElement; represents the numerator of the represented fraction.

denominator

The second child MathMLElement of the MathMLFractionElement; represents the denominator of the represented fraction.

Interface MathMLRadicalElement

IDL Definition

interface MathMLRadicalElement: MathMLElement {
  attribute MathMLElement radicand;
  attribute MathMLElement index;
};

This interface extends the MathMLElement interface for the MathML radical and square root elements <mroot> and <msqrt>.

Attributes

radicand

The first child MathMLElement of the MathMLRadicalElement; represents the base of the represented radical.

index

The second child MathMLElement of the MathMLRadicalElement; represents the index of the represented radical. This must be null for <msqrt> elements.

Interface MathMLStyleElement

IDL Definition

interface MathMLStyleElement: MathMLElement {
  attribute DOMString scriptlevel;
  attribute DOMString displaystyle;
  attribute DOMString scriptsizemultiplier;
  attribute DOMString scriptminsize;
  attribute DOMString color;
  attribute DOMString background;
};

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.

Attributes

scriptlevel

A string of the form "+/- unsigned integer"; represents the scriptlevel attribute for the <mstyle> element, if specified. See also the discussion of this attribute.

displaystyle

Either true or false; a string representing the displaystyle attribute for the <mstyle> element, if specified. See also the discussion of this attribute.

scriptsizemultiplier

A string of the form `number'; represents the scriptsizemultiplier attribute for the <mstyle> element, if specified. See also the discussion of this attribute.

scriptminsize

A string of the form `number v-unit'; represents the scriptminsize attribute for the <mstyle> element, if specified. See also the discussion of this attribute.

color

A string representation of a color; represents the color attribute for the <mstyle> element, if specified. See also the discussion of this attribute.

background

A string representation of a color or the string transparent; represents the background attribute for the <mstyle> element, if specified. See also the discussion of this attribute.

Interface MathMLPaddedElement

IDL Definition

interface MathMLPaddedElement: MathMLElement {
  attribute DOMString width;
  attribute DOMString lspace;
  attribute DOMString height;
  attribute DOMString depth;
};

This interface extends the MathMLElement interface for the MathML spacing adjustment element <mpadded>.

Attributes

width

A string representing the total width of the <mpadded> element, if specified. See also the discussion of this attribute.

lspace

A string representing the lspace attribute - the additional space to the left - of the <mpadded> element, if specified. See also the discussion of this attribute.

height

A string representing the height above the baseline of the <mpadded> element, if specified. See also the discussion of this attribute.

depth

A string representing the depth beneath the baseline of the <mpadded> element, if specified. See also the discussion of this attribute.

Interface MathMLFencedElement

IDL Definition

interface MathMLFencedElement: MathMLElement {
  attribute DOMString open;
  attribute DOMString close;
  attribute DOMString separators;
};

This interface extends the MathMLElement interface for the MathML fenced content element <mfenced>.

Attributes

open

A string representing the opening-fence for the <mfenced> element, if specified; this is the element's open attribute.

close

A string representing the opening-fence for the <mfenced> element, if specified; this is the element's close attribute.

separators

A string representing any separating characters inside the <mfenced> element, if specified; this is the element's separators attribute.

Editor's note: Nico Poppelier (16 October 1999)
The definition of the next interface could not be converted completely, because attribute definitions do not have a child 'raises', which method definitions do have. I left the exception descriptions inside the attribute descriptions.

Interface MathMLScriptElement

IDL Definition

interface MathMLScriptElement: MathMLElement {
  attribute DOMString subscriptshift;
  attribute DOMString superscriptshift;
  attribute MathMLElement base;
  attribute MathMLElement subscript;
  attribute MathMLElement superscript;
};

This interface extends the MathMLElement interface for the MathML subscript, superscript and subscript-superscript pair elements <msub>, <msup>, and <msubsup>.

Attributes

subscriptshift

A string representing the minimum amount to shift the baseline of the subscript down, if specified; this is the element's subscriptshift attribute. This must return null for a <msup>.

superscriptshift

A string representing the minimum amount to shift the baseline of the superscript up, if specified; this is the element's superscriptshift attribute. This must return null for a <msub>.

base

A MathMLElement representing the base of the script. This is the first child of the element.

subscript

A MathMLElement representing the subscript of the script. This is the second child of a <msub> or <msubsup>; retrieval must return null for a <msup>. Exceptions on setting: the DOMException NOT_FOUND_ERR is raised when the element is a <msup>.

superscript

A MathMLElement representing the superscript of the script. This is the second child of a <msup> or the third child of a <msubsup>; retrieval must return null for a <msub>. Exceptions on setting: the DOMException NOT_FOUND_ERR is raised when the element is a <msub>.

Interface MathMLUnderOverElement

IDL Definition

interface MathMLUnderOverElement: MathMLElement {
  attribute DOMString accentunder;
  attribute DOMString accent;
  attribute MathMLElement base;
  attribute MathMLElement underscript;
  attribute MathMLElement overscript;
};

This interface extends the MathMLElement interface for the MathML underscript, overscript and overscript-underscript pair elements munder, mover and munderover.

Attributes

accentunder

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 a <mover>.

accent

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 a <munder>.

base

A MathMLElement representing the base of the script. This is the first child of the element.

underscript

A MathMLElement representing the underscript of the script. This is the second child of a <munder> or <munderover>; retrieval must return null for a <mover>. Exceptions on setting: the DOMException NOT_FOUND_ERR is raised when the element is a <mover>.

overscript

A MathMLElement representing the overscript of the script. This is the second child of a <mover> or the third child of a <munderover>; retrieval must return null for a <munder>. Exceptions on setting: the DOMException NOT_FOUND_ERR is raised when the element is a <munder>.

Editor's note: Nico Poppelier (16 October 1999)
The definition of the next interface did not convert due to a mismatch between the IDL definition and the informal descriptions. I edited the HTML source by hand in order to run the conversion.

Interface MathMLMultiScriptsElement

IDL Definition

interface MathMLMultiScriptsElement: MathMLElement {
  attribute DOMString subscriptshift;
  attribute DOMString superscriptshift;
  attribute MathMLElement base;
  attribute NodeList prescripts;
  attribute NodeList scripts;
  readonly attribute unsigned long numprescriptcolumns;
  readonly attribute unsigned long numscriptcolumns;
  MathMLElement getPreSubScript(in unsigned long colIndex);
  MathMLElement getSubScript(in unsigned long colIndex);
  MathMLElement getPreSuperScript(in unsigned long colIndex);
  MathMLElement getSuperScript(in unsigned long colIndex);
  MathMLElement insertPreSubScriptAt(in unsigned long colIndex, in MathMLElement newElement);
  MathMLElement insertSubScriptAt(in unsigned long colIndex, in MathMLElement newElement);
  MathMLElement insertPreSuperScriptAt(in unsigned long colIndex, in MathMLElement newElement);
  MathMLElement insertSuperScriptAt(in unsigned long colIndex, inout MathMLElement newElement);
};

This interface extends the MathMLElement interface for the MathML multiscripts (including prescripts or tensors) element <mmultiscripts>.

Attributes

subscriptshift

A string representing the minimum amount to shift the baseline of the subscripts down, if specified; this is the element's subscriptshift attribute.

superscriptshift

A string representing the minimum amount to shift the baseline of the superscripts up, if specified; this is the element's superscriptshift attribute.

base

A MathMLElement representing the base of the script. This is the first child of the element.

prescripts

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.

scripts

A NodeList 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

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

numscriptcolumns

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

Methods

getPreSubScript

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

Parameters

colIndex

Column index of prescript (where 0 represents the leftmost prescript column).

Return value

Returns the MathMLElement representing the colIndex-th presubscript (to the left of the base, counting from 0 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

colIndex

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

Return value

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 .

Parameters

colIndex

Column index of pre-superscript (where 0 represents the leftmost prescript column).

Return value

Returns the MathMLElement representing the colIndex-th presuperscript (to the left of the base, counting from 0 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

colIndex

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

Return value

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.

insertPreSubScriptAt

A convenience method to insert a pre-subscript child at the position referenced by column index. If there is currently a pre-subscript at this position, it is replaced by newElement.

Parameters

colIndex

Column index of pre-subscript (where 0 represents the leftmost prescript column).

newElement

MathMLElement to be inserted.

Return value

The MathMLElement being inserted.

This method raises no exceptions.

insertSubScriptAt

A convenience method to insert a subscript child at the position referenced by column index. If there is currently a subscript at this position, it is replaced by newElement.

Parameters

colIndex

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

newElement

MathMLElement to be inserted.

Return value

The MathMLElement being inserted.

This method raises no exceptions.

insertPreSuperScriptAt

A convenience method to insert a pre-superscript child at the position referenced by column index. If there is currently a pre-superscript at this position, it is replaced by newElement.

Parameters

colIndex

Column index of pre-superscript (where 0 represents the leftmost prescript column).

newElement

MathMLElement to be inserted.

Return value

The MathMLElement being inserted.

This method raises no exceptions.

insertSuperScriptAt

A convenience method to insert a superscript child at the position referenced by column index. If there is currently a superscript at this position, it is replaced by newElement.

Parameters

colIndex

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

newElement

MathMLElement to be inserted.

Return value

The MathMLElement being inserted.

This method raises no exceptions.

Interface MathMLTableElement

IDL Definition

interface MathMLTableElement: MathMLElement {
  attribute DOMString align;
  attribute DOMString rowalign;
  attribute DOMString columnalign;
  attribute DOMString groupalign;
  attribute DOMString alignmentscope;
  attribute DOMString rowspacing;
  attribute DOMString columnspacing;
  attribute DOMString rowlines;
  attribute DOMString columnlines;
  attribute DOMString frame;
  attribute DOMString framespacing;
  attribute DOMString equalrows;
  attribute DOMString equalcolumns;
  attribute DOMString displaystyle;
  readonly attribute MathMLCollection rows;
  MathMLTableRowElement insertRow(in unsigned long index);
  void deleteRow(in unsigned long index);
};

This interface extends the MathMLElement interface for the MathML table or matrix element <mtable>.

Attributes

align

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.

rowalign

A string representing the alignment of entries in each row. Allowed values are (top | bottom | center | baseline | axis)+.

columnalign

A string representing the alignment of entries in each column. Allowed values are (left | center | right)+.

groupalign

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 has the form ( left | right | center | decimalpoint)+ .

alignmentscope

A string consisting of the values true or false indicating, for each column, whether it can be used as an alignment scope.

rowspacing

A string of the form ( number v-unit )+ representing the space to be added between rows.

columnspacing

A string of the form ( number h-unit )+ representing the space to be added between columns.

rowlines

A string specifying whether and what kind of lines should be added between each row. Allowed values are (none | solid | dashed)+.

columnlines

A string specifying whether and what kind of lines should be added between each column. Allowed values are (none | solid | dashed)+.

frame

A string specifying a frame around the table. Allowed values are (none | solid | dashed).

framespacing

A string of the form number h-unit number v-unit specifying the spacing between table and its frame.

equalrows

A string with the values true or false.

equalcolumns

A string with the values true or false.

displaystyle

A string with the values true or false.

rows

A MathMLCollection consisting of the rows of the table.

Methods

insertRow

A convenience method to Insert a new (empty) row in the table at the specified index.

Parameters

index

Index at which to insert row.

Return value

Returns the MathMLTableRowElement representing the <mtr> being inserted.

This method raises no exceptions.

deleteRow

A convenience method to delete the row of the table at the specified index.

Parameters

index

Index of row to be deleted..

Return value

None.

This method raises no exceptions.

Interface MathMLTableRowElement

IDL Definition

interface MathMLTableRowElement: MathMLElement {
  attribute DOMString rowalign;
  attribute DOMString columnalign;
  attribute DOMString groupalign;
  attribute MathMLCollection cells;
  MathMLTableCellElement insertCell(in unsigned long index);
  void deleteCell(in unsigned long index);
};

This interface extends the MathMLElement interface for the MathML table or matrix row element <mtr>.

Attributes

rowalign

A string representing an override of the rowalign specified in the containing <mtable>. Allowed values are top | bottom | center | baseline | axis.

columnalign

A string representing an override of the columnalign specified in the containing <mtable>. Allowed values are (left | center | right)+.

groupalign

[To be changed?]

cells

A MathMLCollection consisting of the cells of the row.

Methods

insertCell

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

Parameters

index

Index at which to insert cell.

Return value

Returns the MathMLTableCellElement representing the <mtd> being inserted.

This method raises no exceptions.

deleteCell

A convenience method to delete a cell in the row.

Parameters

index

Index of cell to be deleted.

Return value

None.

This method raises no exceptions.

Interface MathMLTableCellElement

IDL Definition

interface MathMLTableCellElement: MathMLElement {
  attribute DOMString rowspan;
  attribute DOMString columnspan;
  attribute DOMString rowalign;
  attribute DOMString columnalign;
  attribute DOMString groupalign;
  readonly attribute boolean hasaligngroups;
  readonly attribute DOMString cellindex;
};

This interface extends the MathMLElement interface for the MathML table or matrix cell element <mtd>.

Attributes

rowspan

A string representing a positive integer that specifies the number of rows spanned by this cell. The default is 1.

columnspan

A string representing a positive integer that specifies the number of columns spanned by this cell. The default is 1.

rowalign

A string specifying an override of the inherited vertical alignment of this cell within the table row. Allowed values are top | bottom | center | baselne | axis.

columnalign

A string specifying an override of the inherited horizontal alignment of this cell within the table column. Allowed values are left | center | right.

groupalign

A string specifying how the alignment groups within the cell are to be aligned with those in cells above or below this cell. Allowed values are (left | center | right | decimalpoint)+.

hasaligngroups

A string with the values true or false indicating whether the cell contains align groups.

cellindex

A string representing the integer index (1 based??) of the cell in its containing row. [What about spanning cells? How do these affect this value?]

Interface MathMLAlignGroupElement

IDL Definition

interface MathMLAlignGroupElement: MathMLElement {
  attribute DOMString groupalign;
};

This interface extends the MathMLElement interface for the MathML group alignment element <maligngroup/>.

Attributes

groupalign

A string specifying how the alignment group is to be aligned with other alignment groups above or below it. Allowed values are left | center | right | decimalpoint.

Interface MathMLAlignMarkElement

IDL Definition

interface MathMLAlignMarkElement: MathMLElement {
  attribute DOMString edge;
};

This interface extends the MathMLElement interface for the MathML alignment mark element <malignmark/>.

Attributes

edge

A string specifying alignment on the right edge of the preceding element or the left edge of the following element. Allowed values are left | right.

Interface MathMLActionElement

IDL Definition

interface MathMLActionElement: MathMLElement {
  attribute DOMString actiontype;
  attribute DOMString selection;
};

This interface extends the MathMLElement interface for the MathML enlivening expression element <maction>.

Attributes

actiontype

A string specifying the action. Possible values include toggle | statusline | tooltip | highlight | menu.

selection

A string specifying an integer that selects the current subject of the action.

E.1.5. Content Elements

Issue (content-names): We have named all of the content element interfaces MathMLnameElement where <name> is the MathML element.
Issue (number-seps): We are assuming that there is no predetermined limit on the number of <sep> separated arguments to a <cn>. Is this true?

Interface MathMLcnElement

IDL Definition

interface MathMLcnElement: MathMLElement {
  attribute DOMString type;
  attribute DOMString base;
  readonly attribute unsigned long nargs;
  attribute DOMString definitionURL;
  MathMLElement getArgument(in unsigned long index);
  MathMLElement insertArgument(in unsigned long index, in MathMLelement arg);
};

The <cn> element is used to specify actual numeric constants.

Attributes

type

Values include, but are not restricted to, real | integer | rational | complex-cartesian | complex-polar | constant.

base

A string representing an integer between 2 and 36; the base of the numerical representation.

nargs

The number of <sep> separated arguments.

definitionURL

A URL pointing to an alternative definition

Methods

getArgument

A convenience method to retrieve an argument

Parameters

index

Position of the argument in the list of (<sep>-separated arguments. The first argument is numbered 1.

Return value

The MathMLElement argument in the index place.

This method raises no exceptions.

insertArgument

A convenience method to insert an argument child at the position referenced by index. If there is currently an argument at this position, it is replaced by arg.

Parameters

index

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

arg

MathMLElement to be inserted as the argument.

Return value

The MathMLElement inserted. This is the element within the DOM.

This method raises no exceptions.

Interface MathMLciElement

IDL Definition

interface MathMLciElement: MathMLElement {
  attribute DOMString type;
  attribute MathMLElement body;
  attribute DOMString definitionURL;
};

The <ci> element is used to specify a symbolic name.

Attributes

type

Values include integer, rational, real, float, complex, complex-polar, complex-cartesian, constant, any of the MathML content container types (vector, matrix, set, list etc.) or their types.

body

The content of the identifier.

definitionURL

A URL pointing to an alternative definition.

Interface MathMLapplyElement

IDL Definition

interface MathMLapplyElement: MathMLElement {
  attribute MathMLElement operator;
  readonly attribute unsigned long nargs;
  MathMLElement getArgument(in unsigned long index);
  MathMLElement insertArgument(in unsigned long index, in MathMLelement arg);
};

The <apply> element allows a function or operator to be applied to its arguments.

Attributes

operator

The MathML element representing the function or operator that is applied to the list of arguments.

nargs

An integer representing the number of arguments. This does not include the function or operator itself; note that this causes the return value to be less than the return from Node::childNodes().length().

Methods

getArgument

A convenience method to retrieve an argument

Parameters

index

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

Return value

The MathMLElement argument at position index.

This method raises no exceptions.

insertArgument

A convenience method to insert an argument child at the position referenced by index. If there is currently an argument at this position, it is replaced by arg.

Parameters

index

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

arg

The MathMLElement to be inserted as the argument.

Return value

The MathMLElement inserted. This is the new element within the DOM.

This method raises no exceptions.

Issue (reln-deprecated): reln has been deprecated, so we do not include an interface(?).

Interface MathMLfnElement

IDL Definition

interface MathMLfnElement: MathMLElement {
  attribute MathMLElement body;
  attribute DOMString definitionURL;
};

The <fn> element makes explicit the fact that a more general MathML object is intended to be used in the same manner as if it were a pre-defined function such as <sin> or <plus>.

Attributes

body

The MathML object that is to be treated as if it were a pre-defined function.

definitionURL

A URL pointing to a definition for this function-type element. Note that there is no stipulation about the form this definition may take!

Issue (interval-types): There are really two distinct objects here. Should we treat them as different with a common abstract parent class (interval) and two derived classes (endpointsInterval and conditionInterval)? We've chosen to have a single element that can be transformed from one type to the other.

Interface MathMLintervalElement

IDL Definition

interface MathMLintervalElement: MathMLElement {
  attribute DOMString closure;
  readonly attribute boolean isCondition;
  attribute MathMLconditionElement condition;
  attribute MathMLcnElement start;
  attribute MathMLcnElement end;
};

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

Attributes

closure

A string with value open, closed, open-closed or closed-open. The default value is closed.

isCondition

true if this interval is defined by a condition rather than by two real number endpoints.

condition

A MathML <condition> element in the case that the interval is defined using a condition. Setting this attribute has the side effect of setting isCondition to true. Getting this attribute raises an exception if isCondition is false.

start

A MathMLcnElement representing the real number defining the start of the interval. Setting this attribute has the side effect of setting isCondition to false. If end has not already been set, it becomes the same as start until set otherwise. Getting this attribute raises an exception if isCondition is true.

end

A MathMLcnElement representing the real number defining the end of the interval. Setting this attribute has the side effect of setting isCondition to false. If start has not already been set, it becomes the same as end until set otherwise. Getting this attribute raises an exception if isCondition is true.

Issue (sep-interface): There is no separate interface for sep. Each element that allows <sep> has interface methods to access the separated components.
Issue (condition-reln): The 1.01 specification says that a condition contains a single <reln> element or a single <apply> element. Since <reln> is being deprecated in 2.0, we have typed the body as MathMLapplyElement. Is this OK? It may be dangerous if there are documents that use <reln> in this context.

Interface MathMLconditionElement

IDL Definition

interface MathMLconditionElement: MathMLElement {
  attribute MathMLapplyElement condition;
};

The <condition> element is used to place a condition on one or more free variables or identifiers.

Attributes

condition

A MathMLapplyElement that represents the condition.

Issue (declare-constructor): The identifier and the constructor are IDL attributes. However, the constructor is optional. Can we specify that an attempt to get the constructor when it isn't present returns null, or should it raise an exception? Should either of these be IDL attributes?

Interface MathMLdeclareElement

IDL Definition

interface MathMLdeclareElement: MathMLElement {
  attribute DOMString type;
  attribute DOMString scope;
  attribute unsigned long nargs;
  attribute DOMString occurrence;
  attribute DOMString definitionURL;
  attribute MathMLciElement identifier;
  attribute MathMLElement constructor;
};

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.

Attributes

type

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.

scope

A string with values local or global.

nargs

If the identifier is a function, this attribute specifies the number of arguments the function takes.

occurrence

A string with the values prefix, infix or function-model. [What about postfix?]

definitionURL

A URL specifying an alternative definition. [Is `alternative' correct here?]

identifier

A MathMLciElement representing the name being declared.

constructor

An optional MathMLElement providing an initialial value for the object being declared.

Interface MathMLlambdaElement

IDL Definition

interface MathMLlambdaElement: MathMLElement {
  attribute MathMLElement expression;
  readonly attribute unsigned long nvars;
  MathMLElement getVariable(in unsigned long index);
  MathMLElement insertVariable(in unsigned long index, in MathMLelement variable);
};

The <lambda> element is used to construct a user-defined function from an expression and one or more free variables.

Attributes

expression

The MathMLElement representing the expression.

nvars

An integer representing the number of variables in the expression.

Methods

getVariable

A convenience method to retrieve a variable by position.

Parameters

index

Position of the variable in the list of variables. The first variable is numbered 1.

Return value

The MathMLElement representing the variable.

This method raises no exceptions.

insertVariable

A convenience method to insert an argument at the position referenced by index. If there is currently an argument at this position, it is replaced by arg.

Parameters

index

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

variable

The MathMLElement to be inserted as the argument.

Return value

The MathMLElement being inserted. This is the new element within the DOM.

This method raises no exceptions.

Issue (builtin-interface): I propose that all built in operator, relation, and function interfaces either derive from or be directly supported through the MathMLbuiltIn interface. Note that the name does not end with `Element' because this interface does not correspond to a MathML element. The alternative is to provide an interface for every one of these elements individually. Again, this interface supports all empty elements that have only the additional definitionURL attribute. This includes elements that take qualifiers. I don't particularly like the name builtin. Any better suggestions? QUESTION: Should we treat these as objects that own their arguments and provide methods for accessing those arguments? Similarly for operators taking qualifiers - we could provide access to the qualifiers. No, I suppose not. It's the <apply> that owns the arguments. Unless <apply> does the work of validating the arguments (ensuring the correct number, type, and checking any other conditions), there's no easy way to introduce this.

Interface MathMLbuiltIn

This interface supports all of the empty built-in operator, relation, and function elements that have the definitionURL attribute in addition to the standard set of attributes. The elements supported in order of their appearance in 4.4 are:

IDL Definition

interface MathMLbuiltIn: MathMLElement {
  attribute DOMString definitionURL;
  attribute DOMString arity;
};

Attributes

definitionURL

A string that provides an override to the default semantics, or provides a more specific definition

arity

A string representing the number of arguments. Values include 0, 1, ... and variable.

Issue (qualifiers): Qualifiers have the standard attributes, so there is no real need for a separate interface, or in fact to mention them at all in the DOM specification. An interface that is undefined at present is included here just as a placeholder to remind us that it would be nice to provide another form of access and control through the MathMLapplyElement interface.

Interface MathMLqualifierElement

IDL Definition

interface MathMLqualifierElement: MathMLElement {
};

Qualifier elements provide additional data for the operators <int>, <sum>, <product>, <diff>, <partialdiff>, <limit>, <log>, <moment>, <min>, <max>, <forall>, <exists>. The qualifier elements are <lowlimit>, <uplimit>, <bvar>, <degree>, <logbase>, <interval>, and <condition>.

Issue (sets): The following interface seems unsatisfactory. The first problem is that <set> is really two things - a condition set or an explicit list set. Another problem is that it's not easy to express the union of two sets as a set (although it's possible - the problem is that the union of a condition set and a list set is only awkwardly expressed as a condition set). The dual nature of the object makes the interface awkward. Access to the elements of an explicit list set seems problematic. What if another process deletes an element between the time you determine its position and when you delete it? Perhaps the delete function should take only a MathMLElement argument as returned by getElement - this would be the element in the DOM, so there would be no problem of a changing index. NOTE: I've forgotten to provide access to the bvar element(s). How many can we have?

Interface MathMLsetElement

IDL Definition

interface MathMLsetElement: MathMLElement {
  readonly attribute boolean isConditionSet;
  attribute MathMLconditionElement condition;
  readonly attribute unsigned long nelements;
  MathMLElement getElement(in unsigned long index);
  MathMLElement addElement(in MathMLelement element);
   deleteElement(in unsigned long index);
};

The <set> element is the container element which represents a set of elements. The elements of a set can be defined either by explicitly listing the elements, or by using the <bvar> and <condition> elements.

Attributes

isConditionSet

This is true if the set is specified using a condition and false if the set is an explicit list.

condition

A MathMLconditionElement that determines the set. Setting this makes the set causes isConditionSet to be set to true. Getting this if the isConditionSet is false (so the set is an explicit list) should raise an exception?

nelements

The number of elements if the set is an explicit list. Should this raise an exception if this is a condition set? Even if the conditions really amount to an explicit list?

Methods

getElement

A convenience method to retrieve an element. There is no default ordering of the elements. Inserting or deleting an element is not guaranteed to leave the element in the i-th place unchanged even if the action takes place at a larger index.

Parameters

index

Position of the element in the list of elements. The first element is numbered 1.

Return value

The MathMLElement element at position index.

This method raises no exceptions.

addElement

A convenience method to insert an element. The insertion may change the indices of any of the other elements. Since element equivalence is not easy to determine, it seems hard to specify that inserting the same element twice is an error.

Parameters

element

The MathMLElement to be added to the set.

Return value

The MathMLElement being added. This is the element within the DOM.

This method raises no exceptions.

deleteElement

A convenience method to delete an element. The deletion may change the indices of any of the other elements.

Parameters

index

Position of the element in the set

Return value

None

This method raises no exceptions.

Issue (lists): The following interface seems unsatisfactory. The first problem is that <list> is really two things - a condition list or an explicit list. Another problem is that it's not easy to express the union of two lists as a list (although it's possible - the problem is that the union of a condition list and an explicit list set is only awkwardly expressed as a condition list). The dual nature of the object makes the interface awkward. Should an exception be raised if an attempt is made to insert an element into a specified position in a list which is given by a condition? A priori, probably not; but allowing this would certainly seem to give rise to implementation problems! Access to the elements of an explicit list seems problematic. What if another process deletes an element between the time you determine its position and when you delete it? Perhaps the delete function should take only a MathMLElement argument as returned by getElement - this would be the element in the DOM, so there would be no problem of a changing index.

Interface MathMLlistElement

IDL Definition

interface MathMLlistElement: MathMLElement {
  readonly attribute boolean isConditionList;
  attribute MathMLconditionElement condition;
  readonly attribute unsigned long nelements;
  MathMLElement getElement(in unsigned long index);
  MathMLElement addElement(in unsigned long index, in MathMLelement element);
   deleteElement(in unsigned long index);
};

The <list> element is the container element which represents a list of elements. Elements can be defined either by explicitly listing the elements, or by using the <bvar> and <condition> elements.

Attributes

isConditionList

This is true if the <list> is specified using a condition and false if the <list> is an explicit list.

condition

A MathMLconditionElement that determines the <list>. Setting this causes isConditionList to be true. Getting this if the list is an explicit list (if isConditionList is false) should raise an exception?

nelements

The number of elements if the <list> is an explicit list. Should this raise an exception if this is a condition list? Even if the conditions really amount to an explicit list?

Methods

getElement

A convenience method to retrieve an element.

Parameters

index

Position of the element in the list of elements. The first element is numbered 1.

Return value

The MathMLElement element at position index in the list.

This method raises no exceptions.

addElement

A convenience method to insert an element.

Parameters

index

The position in the list at which element is to be added.

element

The MathMLElement to be added to the list.

Return value

The MathMLElement being added. This is the new element within the DOM.

This method raises no exceptions.

deleteElement

A convenience method to delete an element. The deletion may change the indices of elements occurring after index in the list.

Parameters

index

Position of the element in the list.

Return value

None

This method raises no exceptions.

Interface MathMLvectorElement

IDL Definition

interface MathMLvectorElement: MathMLElement {
  readonly attribute unsigned long ncomponents;
  MathMLElement getComponent(in unsigned long index);
  MathMLElement insertComponent(in MathMLelement component);
   deleteComponent(in unsigned long index);
};

<vector> is the container element for a vector.

Attributes

ncomponents

The number of components in the vector.

Methods

getComponent

A convenience method to retrieve a component.

Parameters

index

Position of the component in the list of components. The first element is numbered 1.

Return value

The MathMLElement component at the position specified by index.

This method raises no exceptions.

insertComponent

A convenience method to insert a component. If there is already a component at the position specified by index, it is replaced.

Parameters

component

The MathMLElement which is to be the index-th component of the vector.

Return value

The MathMLElement which is added. This is the new element within the DOM.

This method raises no exceptions.

deleteComponent

A convenience method to delete an element. The deletion changes the indexes of the following components.

Parameters

index

Position of the component in the vector. The position of the first component is 1

Return value

None

This method raises no exceptions.

Interface MathMLmatrixElement

IDL Definition

interface MathMLmatrixElement: MathMLElement {
  readonly attribute unsigned long nrows;
  MathMLmatrixrowElement getRow(in unsigned long index);
  MathMLmatrixrowElement insertRow(in MathMLrowElement row, in unsigned long index);
   deleteRow(in unsigned long index);
};

The <matrix> element is the container element for <matrixrow>'s.

Attributes

nrows

The number of rows in the represented matrix.

Methods

getRow

A convenience method to retrieve a specified row.

Parameters

index

Position of the row in the list of rows. The first row is numbered 1.

Return value

The MathMLmatrixrowElement representing the index-th row.

This method raises no exceptions.

insertRow

A convenience method to insert a row. If there is already a row at the specified index, it is replaced.

Parameters

row

MathMLmatrixrowElement to be inserted into the matrix.

index

Unsigned integer giving the row position at which the row is to be inserted.

Return value

The MathMLmatrixrowElement added. This is the new element within the DOM.

This method raises no exceptions.

deleteRow

A convenience method to delete a row. The deletion changes the indices of the following rows.

Parameters

index

Position of the row to be deleted in the list of rows

Return value

None

This method raises no exceptions.

Issue (matrix-vector): matrix, matrixrow, and vector How to we convert between these elements? The specification states that vectors are equivalent to single column or single row matrices in appropriate contexts. What about matrixrow's? It would help tremendously to have some form of compatibility. Is there any requirement that the number of elements be the same for each matrixrow of a matrix? If so, do we need exceptions to handle the cases where there is an attempt to add incompatible rows to a matrix?

Interface MathMLmatrixrowElement

IDL Definition

interface MathMLmatrixrowElement: MathMLElement {
  readonly attribute unsigned long nelements;
  MathMLElement getElement(in unsigned long index);
  MathMLElement insertElement(in MathMLElement element, in unsigned long index);
   deleteElement(in unsigned long index);
};

The <matrixrow> element is the container element for the elements of a <matrix>.

Attributes

nelements

The number of elements in the row.

Methods

getElement

A convenience method to retrieve an element by index.

Parameters

index

Position of the element in the row. The first element is numbered 1.

Return value

The MathMLElement element at index index in the row.

This method raises no exceptions.

insertElement

A convenience method to insert an element. If there is already an element at the specified index, it is replaced by the new element.

Parameters

element

The MathMLElement to be inserted in the row.

index

The index at which element is to be inserted in the row.

Return value

The MathMLElement created by the insertion. This is the new element within the DOM.

This method raises no exceptions.

deleteElement

A convenience method to delete an element. The deletion changes the indices of the following elements.

Parameters

index

Position of the element to be deleted in the row.

Return value

None

This method raises no exceptions.

Issue (computed-values): Computed Values In general, mixing of presentation and content elements in a single expression is encouraged. Also, I would encourage a bias toward using content markup as much as possible, even in presentation-only systems. This seems to mean that we would want computed values for many common constructs. Or should this be handled in a completely different way?