http://www.w3.org/TR/2002/WD-XHTMLplusMathMLplusSVG-20020809
http://www.w3.org/TR/2002/WD-XHTMLplusMathMLplusSVG-20020430
This document is also available in these non-normative formats: zip archive and gzip'd tar archive
Copyright ©2002 W3C® (MIT, INRIA, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
An XHTML+MathML+SVG profile is a profile that combines XHTML 1.1 [XHTML11], MathML 2.0 [MathML2] and SVG 1.1 [SVG11] together. This profile enables mixing XHTML, MathML and SVG in the same document using XML namespaces [XMLNS] mechanism, while allowing validation of such a mixed-namespace document. An XHTML 1.1 + MathML 2.0 + SVG 1.1 DTD driver is provided. An XHTML version of this document is conforming to this DTD.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. The latest status of this document series is maintained at the W3C.
This document is the second public Working Draft of an XHTML+MathML+SVG profile for review by W3C Members and other interested parties. This document does not define the normative profile of XHTML + MathML + SVG. This is a possible profile. Publication of this Working Draft by W3C indicates no endorsement by W3C or the W3C Team, or any W3C Members. It is an early draft document and may be updated, replaced or made obsolete by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress".
This document has been produced jointly by the W3C HTML Working Group (members only) and the SVG Working Group (members only) as part of the HTML Activity and the Graphics Activity within the Document Formats Domain. A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.
At the time of publication, the Working Groups believed there were zero patent disclosures relevant to this specification. A current list of patent disclosures relevant to this specification may be found on the patent disclosure pages on XHTML, MathML and SVG.
Comments on this document may be sent to www-html-editor@w3.org (archive). Public discussion on this document may take place on the public mailing lists www-html@w3.org (archive) or www-svg@w3.org (archive).
This section is informative.
An XHTML+MathML+SVG profile integrates XHTML 1.1 [XHTML11], MathML 2.0 [MathML2] and SVG 1.1 [SVG11] together, using the XHTML Modularization Framework [XHTMLMOD]. This profile enables mixing XHTML, MathML and SVG in a same document using XML namespaces [XMLNS] mechanism, while allowing validation of such a mixed-namespace document. An XHTML 1.1 + MathML 2.0 + SVG 1.1 DTD driver is provided in section 2.1. The possibility of combining those modules written in XML Schema [XMLSchema] might be explored when XML Schemas for XHTML [XHTMLMODSchema] and others become available and mature.
This DTD driver can primarily be used for an XHTML document that contains MathML and SVG fragments, but it can also be used for an SVG document that contains XHTML and MathML fragments. An SVG fragment inside an XHTML document can contain another XHTML or MathML fragments, and that XHTML fragment can again contain another MathML or SVG fragments. There's no restriction on nesting levels.
Inside XHTML, MathML and SVG fragments are allowed basically anywhere inside
the document body. Inside SVG, XHTML and MathML may be embedded through
the foreignObject
element (SVG 1.1
[SVG11], section 23.3).
A sample
document (MathML and SVG-enabled XHTML browsers only)
shows features in XHTML 1.1 (ruby) and simple MathML and
SVG examples, and a mixture of them using
foreignObject
, in the same document.
On MathML and SVG-enabled XHTML browsers, mixed sample would be rendered
like this:
This DTD driver can also be used as a basis for defining other profiles that combine some or all of XHTML, MathML and SVG. How to define new profiles using this DTD driver is explained in section 4.
This section is normative.
The XHTML 1.1 + MathML 2.0 + SVG 1.1 DTD driver is available as follows:
"This version" of the DTD will be kept as is, while the "latest version" of the DTD will evolve over time, e.g. it might incorporate errata and add new features later. Users of this DTD driver should be aware of this difference.
Note that each referenced DTD modules might also evolve over time. Non-normative "snapshot" of all DTD modules at the time of publication as a flattened DTD is available as follows:
The "latest version" of the flattened DTD will be kept up-to-date, too.
This section contains the driver for an XHTML 1.1 + MathML 2.0 + SVG 1.1 profile implementation as an XML DTD. It relies upon XHTML module implementations defined in Modularization of XHTML [XHTMLMOD] and in Ruby Annotation [Ruby], the XHTML 1.1 DTD implementation defined in XHTML 1.1 [XHTML11], MathML DTD module implementations defined in MathML 2.0 [MathML2], and SVG DTD module implementations defined in SVG 1.1 [SVG11].
<!-- ....................................................................... --> <!-- XHTML 1.1 plus MathML 2.0 plus SVG 1.1 DTD ........................... --> <!-- URI: http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd --> <!-- XHTML 1.1 plus MathML 2.0 plus SVG 1.1 DTD This is a prototype extension of XHTML 1.1 incorporating MathML 2.0 and SVG 1.1. Copyright 2002 World Wide Web Consortium (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. Permission to use, copy, modify and distribute this DTD and its accompanying documentation for any purpose and without fee is hereby granted in perpetuity, provided that the above copyright notice and this paragraph appear in all copies. The copyright holders make no representation about the suitability of the DTD for any purpose. It is provided "as is" without expressed or implied warranty. Editors: Murray M. Altheim <altheim@eng.sun.com> (XHTML modules) David Carlisle <davidc@nag.co.uk> (MathML modules) Jun Fujisawa <fujisawa.jun@canon.co.jp> (SVG modules) Masayasu Ishikawa <mimasa@w3.org> (DTD driver) Revision: $Id: xhtml-math-svg.dtd,v 1.26 2002/08/08 12:33:40 mimasa Exp $ --> <!-- This is the driver for an XHTML 1.1 plus MathML 2.0 plus SVG 1.1 DTD. --> <!-- Switches to include/ignore each vocabulary. --> <!ENTITY % XHTML.module "INCLUDE" > <!ENTITY % MATHML.module "INCLUDE" > <!ENTITY % SVG.module "INCLUDE" > <![%XHTML.module;[ <!ENTITY % XHTML.version "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" > ]]> <!-- Switches to enable subsets. --> <!ENTITY % XHTML.Basic.module "IGNORE" > <!ENTITY % SVG.Basic.module "IGNORE" > <!ENTITY % SVG.Tiny.module "IGNORE" > <!-- Use the following entities to identify the namespaces: --> <!ENTITY % XHTML.xmlns "http://www.w3.org/1999/xhtml" > <!ENTITY % MATHML.xmlns "http://www.w3.org/1998/Math/MathML" > <!ENTITY % MATHML.pref.xmlns "http://www.w3.org/2002/Math/preference" > <!ENTITY % SVG.xmlns "http://www.w3.org/2000/svg" > <!ENTITY % XLINK.xmlns "http://www.w3.org/1999/xlink" > <!-- Declare base URIs for the relevant DTD modules. --> <![%XHTML.module;[ <!ENTITY % XHTML.sysid.base "http://www.w3.org/TR/xhtml-modularization/DTD/" > ]]> <![%MATHML.module;[ <!ENTITY % MATHML.sysid.base "http://www.w3.org/Math/DTD/mathml2/" > ]]> <![%SVG.module;[ <!ENTITY % SVG.sysid.base "http://www.w3.org/Graphics/SVG/1.1/DTD/" > ]]> <!-- Declare system identifiers for the relevant DTD modules. --> <![%XHTML.module;[ <![%XHTML.Basic.module;[ <!ENTITY % XHTML.dtd.fpi "-//W3C//DTD XHTML Basic 1.0//EN" > <!ENTITY % XHTML.dtd.sysid "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd" > ]]> <!ENTITY % XHTML.dtd.fpi "-//W3C//DTD XHTML 1.1//EN" > <!ENTITY % XHTML.dtd.sysid "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" > ]]> <![%MATHML.module;[ <!ENTITY % MATHML.dtd.sysid "%MATHML.sysid.base;mathml2.dtd" > <!ENTITY % MATHML.qname.sysid "%MATHML.sysid.base;mathml2-qname-1.mod" > ]]> <![%SVG.module;[ <![%SVG.Tiny.module;[ <!ENTITY % SVG.dtd.fpi "-//W3C//DTD SVG 1.1 Tiny//EN" > <!ENTITY % SVG.dtd.sysid "%SVG.sysid.base;svg11-tiny.dtd" > ]]> <![%SVG.Basic.module;[ <!ENTITY % SVG.dtd.fpi "-//W3C//DTD SVG 1.1 Basic//EN" > <!ENTITY % SVG.dtd.sysid "%SVG.sysid.base;svg11-basic.dtd" > ]]> <!ENTITY % SVG.dtd.fpi "-//W3C//DTD SVG 1.1//EN" > <!ENTITY % SVG.dtd.sysid "%SVG.sysid.base;svg11.dtd" > ]]> <!-- See the XHTML / MathML / SVG Qualified Names modules for information on the use of namespace prefixes in the DTD. Default values are as follows: <!ENTITY % NS.prefixed "IGNORE" > <!ENTITY % XHTML.prefixed "%NS.prefixed;" > <!ENTITY % XHTML.prefix "" > <!ENTITY % MATHML.prefixed "%NS.prefixed;" > <!ENTITY % MATHML.prefix "m" > <!ENTITY % MATHML.pref.prefixed "IGNORE" > <!ENTITY % MATHML.pref.prefix "pref" > <!ENTITY % SVG.prefixed "%NS.prefixed;" > <!ENTITY % SVG.prefix "" > <!ENTITY % XLINK.prefix "xlink" > In this DTD driver, XHTML and MathML are not prefixed, and SVG is prefixed by default. It can be changed by redeclaring the above parameter entities. --> <!ENTITY % XHTML.prefixed "IGNORE" > <!ENTITY % MATHML.prefixed "IGNORE" > <!ENTITY % MATHML.prefix "m" > <!ENTITY % MATHML.pref.prefixed "IGNORE" > <!ENTITY % MATHML.pref.prefix "pref" > <!ENTITY % SVG.prefixed "INCLUDE" > <!ENTITY % SVG.prefix "svg" > <!ENTITY % XLINK.prefix "xlink" > <!-- a URI reference, see [URI] --> <!ENTITY % URI.datatype "CDATA" > <!-- Declare a parameter entity %XLINK.xmlns.attrib; containing the XML Namespace declarations for XLink. --> <!ENTITY % XLINK.xmlns.attrib "xmlns:%XLINK.prefix; %URI.datatype; #FIXED '%XLINK.xmlns;'" > <!-- Allow universal MathML stylesheet-related declarations. When it is used, it must always be prefixed. --> <![%MATHML.module;[ <![%MATHML.pref.prefixed;[ <!ENTITY % MATHML.pref.renderer.extra ""> <!ENTITY % MATHML.pref.renderer "css | mathplayer-dl | mathplayer | techexplorer-plugin | techexplorer"> <!ENTITY % MATHML.pref.xmlns.attrib "xmlns:%MATHML.pref.prefix; %URI.datatype; #FIXED '%MATHML.pref.xmlns;' %MATHML.pref.prefix;:renderer ( %MATHML.pref.renderer; %MATHML.pref.renderer.extra; ) #IMPLIED" > ]]> ]]> <!ENTITY % MATHML.pref.xmlns.attrib "" > <!-- The parameter entities %SVG.xmlns.extra.attrib; and %XHTML.xmlns.extra.attrib; may be redeclared to contain any foreign namespace declarations for namespaces embedded in XHTML+MathML+SVG. The default value is an empty string. --> <!ENTITY % SVG.xmlns.extra.attrib "" > <!ENTITY % XHTML.xmlns.extra.attrib "" > <!-- Declare parameter entities to define XML Namespace declarations for SVG, XHTML and MathML. --> <![%SVG.module;[ <![%SVG.prefixed;[ <!ENTITY % SVG.xmlns.decl.attrib "xmlns:%SVG.prefix; %URI.datatype; #FIXED '%SVG.xmlns;'" > ]]> <!ENTITY % SVG.xmlns.decl.attrib "xmlns %URI.datatype; #FIXED '%SVG.xmlns;'" > ]]> <!ENTITY % SVG.xmlns.decl.attrib "" > <![%XHTML.module;[ <![%XHTML.prefixed;[ <!ENTITY % XHTML.xmlns.decl.attrib "xmlns:%XHTML.prefix; %URI.datatype; #FIXED '%XHTML.xmlns;'" > ]]> <!ENTITY % XHTML.xmlns.decl.attrib "xmlns %URI.datatype; #FIXED '%XHTML.xmlns;'" > ]]> <!ENTITY % XHTML.xmlns.decl.attrib "" > <![%MATHML.module;[ <![%MATHML.prefixed;[ <!ENTITY % MATHML.xmlns.decl.attrib "xmlns:%MATHML.prefix; %URI.datatype; #FIXED '%MATHML.xmlns;'" > ]]> <!ENTITY % MATHML.xmlns.decl.attrib "xmlns %URI.datatype; #FIXED '%MATHML.xmlns;'" > ]]> <!ENTITY % MATHML.xmlns.decl.attrib "" > <!-- Declare common case for %NS.decl.attrib;. --> <!ENTITY % NS.common.decl.attrib "%SVG.xmlns.decl.attrib; %XHTML.xmlns.decl.attrib; %MATHML.xmlns.decl.attrib; %XLINK.xmlns.attrib; %MATHML.pref.xmlns.attrib; %SVG.xmlns.extra.attrib; %XHTML.xmlns.extra.attrib;" > <!-- Redeclare the parameter entity %NS.decl.attrib; containing all XML Namespace declarations used in the DTD, its form dependent on whether prefixing is active. --> <![%SVG.prefixed;[ <![%XHTML.prefixed;[ <!-- SVG and XHTML are prefixed, MathML is either prefixed or not prefixed. --> <!ENTITY % NS.decl.attrib "%NS.common.decl.attrib;" > ]]> <![%MATHML.prefixed;[ <!-- SVG and MathML are prefixed, XHTML is not prefixed. --> <!ENTITY % NS.decl.attrib "%NS.common.decl.attrib;" > ]]> <!-- SVG is prefixed, XHTML and MathML are not prefixed. MathML namespace must always be specified on the math element. --> <!ENTITY % NS.decl.attrib "%SVG.xmlns.decl.attrib; %XHTML.xmlns.decl.attrib; %XLINK.xmlns.attrib; %MATHML.pref.xmlns.attrib; %SVG.xmlns.extra.attrib; %XHTML.xmlns.extra.attrib;" > ]]> <![%XHTML.prefixed;[ <![%MATHML.prefixed;[ <!-- SVG is not prefixed, XHTML and MathML are prefixed. --> <!ENTITY % NS.decl.attrib "%NS.common.decl.attrib;" > ]]> <!-- SVG and MathML are not prefixed, which is not allowed. --> <!ENTITY % NS.decl.attrib "" > ]]> <!-- SVG, MathML and XHTML are all not prefixed, which is not allowed. --> <!ENTITY % NS.decl.attrib "" > <!-- Redeclare parameter entities %SVG.xmlns.attrib; and %XHTML.xmlns.attrib; containing all XML namespace declarations used by XHTML+MathML+SVG, including a default xmlns declaration when prefixing is inactive. --> <![%SVG.module;[ <!ENTITY % SVG.xmlns.attrib "%NS.decl.attrib;" > ]]> <![%XHTML.module;[ <!ENTITY % XHTML.xmlns.attrib "%NS.decl.attrib;" > ]]> <!-- Redeclare the parameter entity %MATHML.xmlns.extra.attrib; containing XLink and MathML preferences namespace declarations allowed on MathML elements. --> <![%MATHML.module;[ <!ENTITY % MATHML.xmlns.extra.attrib "%XLINK.xmlns.attrib; %MATHML.pref.xmlns.attrib;" > ]]> <!-- Framework Redeclaration placeholders ....................... --> <![%XHTML.module;[ <!ENTITY % XHTML.redecl.module "INCLUDE" > <![%XHTML.redecl.module;[ <!-- Pre-Framework Redeclaration placeholder .................... --> <!ENTITY % xhtml-prefw-redecl.mod "" > <!-- Post-Framework Redeclaration placeholder ................... --> <!ENTITY % xhtml-postfw-redecl.mod "" > ]]> ]]> <![%SVG.module;[ <!ENTITY % SVG.redecl.module "INCLUDE" > <![%SVG.redecl.module;[ <!-- Pre-Framework Redeclaration placeholder ..................... --> <!ENTITY % svg-prefw-redecl.mod "" > <!-- Post-Framework Redeclaration placeholder .................... --> <!ENTITY % svg-postfw-redecl.mod "" > ]]> ]]> <!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --> <!-- Declare MathML Qualified Names module as an extension of XHTML's Qualified Names module. --> <![%MATHML.module;[ <!ENTITY % xhtml-qname-extra.decl 'PUBLIC "-//W3C//ENTITIES MathML 2.0 Qualified Names 1.0//EN" "%MATHML.qname.sysid;"' > <!ENTITY % xhtml-qname-extra.mod %xhtml-qname-extra.decl; > ]]> <!-- Declare location of math and svg contents in XHTML. --> <![%MATHML.module;[ <![%MATHML.prefixed;[ <!ENTITY % MATHML.pfx "%MATHML.prefix;:" > ]]> <!ENTITY % MATHML.pfx "" > <!ENTITY % math.qname "%MATHML.pfx;math" > <!ENTITY % MATHML.math.class "| %math.qname;" > ]]> <!ENTITY % MATHML.math.class "" > <![%SVG.module;[ <![%SVG.prefixed;[ <!ENTITY % SVG.pfx "%SVG.prefix;:" > ]]> <!ENTITY % SVG.pfx "" > <!ENTITY % SVG.svg.qname "%SVG.pfx;svg" > <!ENTITY % SVG.svg.class "| %SVG.svg.qname;" > ]]> <!ENTITY % SVG.svg.class "" > <![%XHTML.module;[ <![%XHTML.Basic.module;[ <!ENTITY % Misc.class "%MATHML.math.class; %SVG.svg.class;" > ]]> <!ENTITY % Misc.extra "%MATHML.math.class; %SVG.svg.class;" > ]]> <!-- Redeclare SVG's foreignObject content (allow anything). --> <![%SVG.module;[ <!ENTITY % SVG.foreignObject.content "ANY" > ]]> <!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --> <!-- Instantiate SVG DTD ........................................ --> <![%SVG.module;[ <!ENTITY % SVG.dtd.decl 'PUBLIC "%SVG.dtd.fpi;" "%SVG.dtd.sysid;"' > <!ENTITY % SVG.dtd %SVG.dtd.decl; > %SVG.dtd; ]]> <!-- Instantiate XHTML DTD ...................................... --> <![%XHTML.module;[ <!ENTITY % XHTML.dtd.decl 'PUBLIC "%XHTML.dtd.fpi;" "%XHTML.dtd.sysid;"' > <!ENTITY % XHTML.dtd %XHTML.dtd.decl; > %XHTML.dtd; ]]> <!-- instantiate MathML 2.0 DTD ................................. --> <![%MATHML.module;[ <!ENTITY % MATHML.dtd.decl 'PUBLIC "-//W3C//DTD MathML 2.0//EN" "%MATHML.dtd.sysid;"' > <!ENTITY % MATHML.dtd %MATHML.dtd.decl; > %MATHML.dtd; ]]> <!-- end of xhtml-math-svg.dtd -->
This section is informative.
As shown in the above DTD driver, a couple of parameter entities are prepared to switch on/off namespace prefixes and to change namespace prefixes arbitrarily. The default values are as follows:
<!ENTITY % XHTML.prefixed "IGNORE" > <!ENTITY % XHTML.prefix "" > <!ENTITY % MATHML.prefixed "IGNORE" > <!ENTITY % MATHML.prefix "m" > <!ENTITY % SVG.prefixed "INCLUDE" > <!ENTITY % SVG.prefix "svg" > <!ENTITY % XLINK.prefix "xlink" >
%XHTML.prefixed;
,
%MATHML.prefixed;
,
%SVG.prefixed;
These parameter entities switch on/off namespace prefixing. Setting
the value to 'INCLUDE
' makes namespace prefixing on,
and 'IGNORE
' switches off namespace prefixing.
By default, XHTML and MathML are not prefixed, and SVG is prefixed
with 'svg:'.
Also check the limitation on name collisions.
%XHTML.prefix;
,
%MATHML.prefix;
,
%SVG.prefix;
,
%XLINK.prefix;
These parameter entities set namespace prefixes for relevant
vocabularies. These values take effect only if relevant prefixing
is enabled. The same prefix may not be used for different vocabularies.
Note that XLink attributes must always be prefixed, so the value of
%XLINK.prefix;
must not be an empty string.
There are also parameter entities that define system identifiers for relevant DTD modules as follows:
<!ENTITY % XHTML.sysid.base "http://www.w3.org/TR/xhtml-modularization/DTD/" > <!ENTITY % MATHML.sysid.base "http://www.w3.org/Math/DTD/mathml2/" > <!ENTITY % SVG.sysid.base "http://www.w3.org/Graphics/SVG/1.1/DTD/" > <!ENTITY % XHTML.dtd.sysid "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" > <!ENTITY % MATHML.dtd.sysid "%MATHML.sysid.base;mathml2.dtd" > <!ENTITY % MATHML.qname.sysid "%MATHML.sysid.base;mathml2-qname-1.mod" > <!ENTITY % SVG.dtd.sysid "%SVG.sysid.base;svg11.dtd" >
When necessary, these parameter entities may be overridden to point to local copies of those DTD modules, e.g. for off-line authoring. Authors should not override these parameter entities when delivering the content.
If authors want to use XHTML as the host language, this DTD driver may be typically invoked as follows:
<!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">
If necessary, authors may change the above parameter entities as appropriate in the internal DTD subset. A typical document might look something like this:
<?xml version="1.0"?> <!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"> <head> <title>XHTML as the host language</title> </head> <body> ... XHTML content ... <math xmlns="http://www.w3.org/1998/Math/MathML"> ... MathML content ... </math> ... XHTML content ... <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> ... SVG content ... <svg:switch> <svg:foreignObject ...> <p> ... XHTML content ... <math xmlns="http://www.w3.org/1998/Math/MathML"> ... MathML content ... </math> ... XHTML content ... </p> </svg:foreignObject> </svg:switch> </svg:svg> </body> </html>
If MathML is not prefixed, the MathML namespace must always be
declared on the math
element to avoid
confusion of namespace defaulting with XHTML.
If authors want to use SVG as the host language, this DTD driver may be typically invoked as follows:
<!DOCTYPE svg:svg 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">
In this case SVG elements are still prefixed and XHTML and MathML elements are not prefixed. In order to make SVG elements non-prefixed, authors may adjust relevant parameter entities in the internal DTD subset like this:
<?xml version="1.0"?> <!DOCTYPE svg 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"[ <!ENTITY % SVG.prefixed "IGNORE" > <!ENTITY % XHTML.prefixed "INCLUDE" > <!ENTITY % XHTML.prefix "xhtml" > <!ENTITY % MATHML.prefixed "INCLUDE" > <!ENTITY % MATHML.prefix "math" > ]> <svg version="1.1" xml:lang="en" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <desc>SVG as the host language</desc> ... SVG content ... <switch> <foreignObject ...> <xhtml:p xmlns:xhtml="http://www.w3.org/1999/xhtml"> ... XHTML content ... <math:math xmlns:math="http://www.w3.org/1998/Math/MathML"> ... MathML content ... </math:math> ... XHTML content ... </xhtml:p> </foreignObject> </switch> ... SVG content ... </svg>
Note that the namespace declarations may be collectively declared on the root element (or other elements), like:
<?xml version="1.0"?> <!DOCTYPE svg 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"[ <!ENTITY % SVG.prefixed "IGNORE" > <!ENTITY % XHTML.prefixed "INCLUDE" > <!ENTITY % XHTML.prefix "xhtml" > <!ENTITY % MATHML.prefixed "INCLUDE" > <!ENTITY % MATHML.prefix "math" > ]> <svg version="1.1" xml:lang="en" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:math="http://www.w3.org/1998/Math/MathML"> <desc>SVG as the host language</desc> ... SVG content ... <switch> <foreignObject ...> <xhtml:p> ... XHTML content ... <math:math> ... MathML content ... </math:math> ... XHTML content ... </xhtml:p> </foreignObject> </switch> ... SVG content ... </svg>
When using MathML, authors may wish to use the "Universal MathML stylesheet" [MathML-XSL] to make it possible to be viewed on a large number of Web browsers. This DTD driver allows authors to use this XSLT stylesheet easily. The DTD driver includes the following parameter entities:
<!ENTITY % MATHML.pref.prefixed "IGNORE" > <!ENTITY % MATHML.pref.prefix "pref" >
Authors may include an XML stylesheet processing instruction for
the universal MathML stylesheet as explained in "Putting mathematics
on the Web with MathML" [MathML-XSL], and when they want to
specify preferences for the MathML renderer, they may set the
%MATHML.pref.prefixed;
parameter entity to
"INCLUDE
".
This allows authors to declare the MathML preferences namespace
and use the renderer
attribute like this:
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="http://www.w3.org/Math/XSL/mathml.xsl"?> <!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"[ <!ENTITY % MATHML.pref.prefixed "INCLUDE" > ]> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="css"> <head> ... </head> <body> ... </body> </html>
The namespace prefix for the MathML preferences namespace may be
changed by redeclaring the %MATHML.pref.prefix;
parameter entity in the internal DTD subset.
This section is informative.
This DTD driver can also be used as a basis for defining other
profiles that combine some or all of XHTML, MathML and SVG.
This DTD driver has switches to include/ignore each vocabulary,
all set to "INCLUDE
" by default:
<!ENTITY % XHTML.module "INCLUDE" > <!ENTITY % MATHML.module "INCLUDE" > <!ENTITY % SVG.module "INCLUDE" >
For example, by redeclaring the %MATHML.module;
parameter entity to "IGNORE
", this DTD driver
can be used as an XHTML 1.1 + SVG 1.1 DTD.
People might want to use other XHTML Family document type such as
XHTML Basic [XHTMLBasic]
instead of XHTML 1.1, or other SVG profiles like SVG Basic/Tiny
[SVGMobile] instead of full
SVG 1.1. There are predefined parameter entities to allow those subsets
easily, all set to "IGNORE
" by default:
<!ENTITY % XHTML.Basic.module "IGNORE" > <!ENTITY % SVG.Basic.module "IGNORE" > <!ENTITY % SVG.Tiny.module "IGNORE" >
By redeclaring the %XHTML.Basic.module;
parameter entity to "INCLUDE
", this DTD driver will use
XHTML Basic instead of XHTML 1.1 for XHTML part. Likewise,
%SVG.Basic.module;
and
%SVG.Tiny.module;
control whether to use
SVG Basic/Tiny instead of SVG 1.1, respectively.
When both %SVG.Basic.module;
and
%SVG.Tiny.module;
are set to "INCLUDE
",
SVG Tiny will be used.
Using this mechanism, XHTML Basic + SVG Tiny DTD can be simply written like this:
<!-- ....................................................................... --> <!-- XHTML Basic plus SVG Tiny DTD ........................................ --> <!-- URI: http://www.w3.org/2002/04/xhtml-math-svg/xhtml-basic-svg-tiny.dtd --> <!ENTITY % XHTML.version "-//W3C//DTD XHTML Basic plus SVG Tiny//EN" > <!ENTITY % XHTML.Basic.module "INCLUDE" > <!ENTITY % MATHML.module "IGNORE" > <!ENTITY % SVG.Tiny.module "INCLUDE" > <!ENTITY % XHTML-MATH-SVG.dtd 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" > %XHTML-MATH-SVG.dtd; <!-- end of xhtml-basic-svg-tiny.dtd -->
In addition, each DTD is parameterized as
%XHTML.dtd;
,
%MATHML.dtd;
and
%SVG.dtd;
,
so by redeclaring the relevant parameter entity to refer to a different
DTD, different profile may be easily defined.
This section is informative.
Although this DTD driver has taken a great stride to provide as much flexibility as possible, there are some limitations, mostly due to the limitation of the DTD mechanism itself.
ISSUE:
At the moment, inside SVG, XHTML and MathML fragments are only
allowed through the foreignObject
element. It would make sense to also allow those foreign namespace
fragments inside the desc
and title
elements. Future update of this profile
may allow such integration.
It is also under discussion whether to allow those foreign namespace
fragments directly inside elements like text
and tspan
. Such a close integration would
be useful for mathematical diagrams, but the processing needs to be
clarified.
D. Carlisle, P. Ion, R. Miner, N. Poppelier, eds., 21 February 2001
Available at: http://www.w3.org/TR/2001/REC-MathML2-20010221
The latest version is available at: http://www.w3.org/TR/MathML2
M. Sawicki, M. Suignard, M. Ishikawa, M. Dürst, T. Texin, eds., 31 May 2001.
Available at: http://www.w3.org/TR/2001/REC-ruby-20010531
The latest version is available at: http://www.w3.org/TR/ruby
D. Jackson, J. Ferraiolo, J. Fujisawa, eds., 30 April 2002, work in progress.
Available at: http://www.w3.org/TR/2002/CR-SVG11-20020430/
The latest version is available at: http://www.w3.org/TR/SVG11/
"Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, T. Berners-Lee, R. Fielding, L. Masinter, August 1998.
Available at: http://www.rfc-editor.org/rfc/rfc2396.txt
M. Altheim, S. McCarron, eds., 31 May 2001.
Available at: http://www.w3.org/TR/2001/REC-xhtml11-20010531
The latest version is available at: http://www.w3.org/TR/xhtml11
S. P. McCarron et al., 10 April 2001.
Available at: http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410
The latest version is available at: http://www.w3.org/TR/xhtml-modularization
T. Bray, D. Hollander, A. Layman, eds., 14 January 1999. Available at: http://www.w3.org/TR/1999/REC-xml-names-19990114
The latest version is available at: http://www.w3.org/TR/REC-xml-names
T. Capin, ed., 30 April 2002, work in progress.
Available at: http://www.w3.org/TR/2002/CR-SVGMobile-20020430/
The latest version is available at: http://www.w3.org/TR/SVGMobile/
M. Baker, M. Ishikawa, S. Matsui, P. Stark, T. Wugofski, T. Yamakami, eds., 19 December 2000. Available at: http://www.w3.org/TR/2000/REC-xhtml-basic-20001219
The latest version is available at: http://www.w3.org/TR/xhtml-basic
D. Austin, S. P. McCarron, eds., 19 December 2001, work in progress.
Available at: http://www.w3.org/TR/2001/WD-xhtml-m12n-schema-20011219
The latest version is available at: http://www.w3.org/TR/xhtml-m12n-schema
H. S. Thompson, D. Beech, M. Maloney, N. Mendelsohn, eds., 2 May 2001.
Available at: http://www.w3.org/TR/2001/REC-xmlschema-1-20010502
The latest version is available at: http://www.w3.org/TR/xmlschema-1
See also "XML Schema Part 2: Datatypes", available at: http://www.w3.org/TR/2001/REC-xmlschema-2-20010502
The latest version is available at: http://www.w3.org/TR/xmlschema-2
This section is informative.
%MATHML.sysid.base;
to point to an updated MathML 2.0 DTD.This section is informative.
(To be added)