(Excerpt from "The MathML Handbook" by Pavi Sandhu)

Most programming languages include strings as a fundamental data type for representing sequences of characters. In order to communicate with other programming applications such as computer algebra systems, MathML provides the ms element for representing strings.

The content of an ms element is typically rendered with a quotation mark character at the beginning and end. By default, the left and right quotation mark characters are the standard double quotation mark character, ", but using the attributes lquote and rquote you can substitute either of these with a different character, as shown here:

"This is a string"
<ms>This is a string</ms>

'This is a string'
<ms lquote="&apos;" rquote="&apos;">This is a string</ms>

As with any other token element, whitespace that occurs within the content of an ms element is automatically trimmed from the ends and collapsed. Hence, any whitespace that you must include when representing a string should be explicitly encoded using one of the named space characters such as &nbsp; or &ThinSpace;.


<< back next >>




Tipp der data2type-Redaktion:
Zum Thema MathML bieten wir auch folgende Schulungen zur Vertiefung und professionellen Fortbildung an:


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