Content element attributes
(Excerpt from "The MathML Handbook" by Pavi Sandhu)
Content markup supports about a dozen attributes. The relatively small number of attributes reflects the fact that content markup does not provide detailed information about rendering. This is in contrast to presentation markup, which requires a relatively large number of attributes (about 50), to properly describe the numerous subtle details of how notation should be visually rendered.
As discussed under MathML attributes, six attributes are accepted by all content elements:
- class, style, and id: facilitate use of CSS and XSL stylesheets.
- xlink:href: is used for setting up links.
- xref: is used in parallel markup.
- other: is used for specifying nonstandard attributes that are not defined in MathML but may be supported by specific processing applications.
The other attribute has a special role in content markup. It can be used to tell rendering applications to favor one type of notation over another when they render specific types of content markup. You can use this attribute to indicate that a particular expression should be rendered in display style instead of inline style. Alternatively, you could use it to specify that the derivative of a function should be rendered as instead of . This type of information cannot be described using existing content elements and attributes, but specific rendering applications can still recognize and interpret it.
For example, if a specific renderer recognizes a display attribute, an author could indicate that an expression be displayed in inline style using the following markup:
In addition to the six common attributes that are accepted by all content elements, nine other attributes are accepted by specific content elements only. A brief description of each attribute is given below.
This attribute is used with the cn element to specify the base of the number being encoded. It can be set to any number and has a default value of 10. For example, the following markup specifies the number 18 in binary notation:
This attribute is used with the interval element to specify the type of interval being encoded. It can take the values open, closed, open-closed, or closed-open. Its default value is closed. For example, the interval [0, 1) can be specified as:
<interval closure="open-closed"> <cn>0</cn> <cn>1</cn> </interval>
This attribute is accepted by the csymbol, declare, and semantics elements as well as by every content element that represents an operator or function. It specifies a URL that contains semantic information about the meaning of the object being constructed.
This attribute is accepted by the semantics, annotation, annotation-xml, and csymbol elements as well as by every content element that represents an operator or function. It specifies the format used to encode semantic information about the meaning of the object being constructed.
This attribute is used with the declare element to specify the number of arguments taken by the function being declared. For example, the following expression declares a function f with two arguments:
<declare type="fn" nargs="2"> <ci>f</ci> </declare>
This attribute is used with the declare element to specify the position in which an operator being declared can occur. Possible values are prefix, infix, and function-model, with the latter being the default value.
This attribute is used with the list element to specify the criterion used for ordering the elements of a list. Possible values are lexicographic and numeric, which correspond to the list elements being ordered alphabetically or numerically, respectively. The default value is numeric.
This attribute is used with the declare element to indicate the scope of the declaration. Possible values are local and global. In MathML 2.0, this attribute is deprecated and there is no difference between its two possible values.
This attribute has a slightly different meaning — allowed values and default value — depending on the type of element it is used with. It can be used with the following five content elements: cn, ci, declare, set, and tendsto.
When used with the cn element, it specifies the type of the number being encoded. Possible values are real, integer, float, rational, complex-polar, complex-cartesian, e-notation, or constant. The default value is real.
When used with the ci element, it specifies the type of identifier being encoded. In addition to all the above values that it can take when specified in the cn element, it can be set to the name of a container content element such as list, set, vector, matrix, or fn.
When used with the declare element, it declares an object to be of a specified type. It can be set to the name of any container content element such as list, set, vector, matrix, or fn.
When used with the set element, it indicates the type of set. Possible values are multiset (which indicates that repeated values are allowed) and normal (which indicates that repeated values are not allowed). The default value is normal.
When used with the tendsto element, it indicates the direction in which one quantity is approaching another. Possible values are above, below, and two-sided. The default value is above.
|<< back||next >>|
Copyright © CHARLES RIVER MEDIA, INC., Massachusetts (USA) 2003
Printing of the online version is permitted exclusively for private use. Otherwise this chapter from the book "The MathML Handbook" is subject to the same provisions as those applicable for the hardcover edition: The work including all its components is protected by copyright. All rights reserved, including reproduction, translation, microfilming as well as storage and processing in electronic systems.
CHARLES RIVER MEDIA, INC., 20 Downer Avenue, Suite 3, Hingham, Massachusetts 02043, United States of America