HTML and CSS Reference
In-Depth Information
XHTML + MathML + SVG
One of the easiest ways to demonstrate the power of XML is to create mixed-namespace documents. General and
mathematical markup as well as vector graphics can be described within the same document by the XHTML +
MathML + SVG profile. This profile combines XHTML 1.1, MathML 2.0, and SVG 1.1.
The host language of XHTML + MathML + SVG documents can be either XHTML or SVG.
XHTML as the Host Language
Listing 3-63 shows a typical XHTML + MathML + SVG document.
Listing 3-63. An XHTML + MathML + SVG Skeleton Document in XHTML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
" http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd " >
<html xmlns=" http://www.w3.org/1999/xhtml " xml:lang="en" dir="ltr">
<head>
<title>Sample XHTML 1.1 plus MathML 2.0 plus SVG 1.1 document</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style/style.css"/>
</head>
<body>
<h2 id="math">MathML sample</h2>
<p>Math expression
<math xmlns=" http://www.w3.org/1998/Math/MathML " >
<mrow>
<mi>y</mi>
<mo>=</mo>
<mfrac>
<mn>1</mn>
<msqrt>
<mrow>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msqrt>
</mfrac>
</mrow>
</math>
inside an XHTML paragraph.</p>
<h2 id="svg">SVG sample</h2>
 
Search WWH ::




Custom Search