This is the fourth installment of our XHTML/HTML series. One of the advantages of XML as a markup language is that it is extensible: that is, it is possible to define new markup within the context of the overall markup language. XHTML is one such example of an XML-constructed markup language, but there are others likes the ones we describe below. HTML offers none of these facilities.
MathML
Mathematical notation is a particularly challenging task for typesetting in a meaningful way. Especially difficult is to be able to simultaneously describe the semantics of the mathematical expression while providing sufficient information about how the author wants it to be laid out on the page. It is the same challenge of content and style that exists in HTML.
MathML addresses this challenge by allowing an author to be very precise about the symbols to be used, the interpretation that should be applied to each symbol, and the structure that builds them up into a precise mathematical language.
MathML documents can be embedded directly into an XHTML document using an appropriate stylesheet and namespace. See for example http://www.w3.org/Math/testsuite/mml2-testsuite/index.html from the MathML test suite.
SVG
SVG is a language for describing scalable vector-based graphics from within an XML document. This allows pictures, drawings and schematics to be directly nested within an XHTML document without requiring additional resources such as large image files to be downloaded from the server, although it is possible to include smaller images within an SVG file.
Uses of SVG include maps sent to mobile phones, schematics of web sites, and, ultimately, any web-based graphical experience. Because the SVG forms part of the document structure, it can be modified interactively using JavaScript, thus updating the image locally without needing to interact with the server.
In Summary
XHTML provides more than just the opportunity to write HTML documents. Because it is based on an extensible infrastructure, it is possible to extend the supported languages and create multipurpose files.