This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Few comments about MathML module for DocBook
- To: docbook at lists dot oasis-open dot org
- Subject: DOCBOOK: Few comments about MathML module for DocBook
- From: Jirka Kosek <jirka at kosek dot cz>
- Date: Sat, 10 Mar 2001 22:11:41 +0100
Hi,
I have tried to use MathML V1.0beta3 from OASIS site. In fact I must do
some additional customizations to successfully cross DocBook and MathML
DTD. My dbmathml.dtd now looks like this:
<!ENTITY % mathml-colon ':'>
<!ENTITY % mathml-prefix 'mml'>
<!ENTITY % equation.content "(alt?, (graphic+|mediaobject+|mml:math))">
<!ENTITY % docbook PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
%docbook;
<!-- !!!!!!!START OF ADDITION!!!!!!! -->
<!ENTITY % NS.prefixed "INCLUDE">
<!ENTITY % MATHML.prefix "%mathml-prefix;">
<!ENTITY % NamespaceDecl.attrib "xmlns:mml CDATA #FIXED
'http://www.w3.org/1998/Math/MathML'">
<!-- !!!!!!!END OF ADDITION!!!!!!!! -->
<!-- You must also include the MathML DTD -->
<!ENTITY % mathml PUBLIC "-//W3C//DTD MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/mathml2.dtd">
%mathml;
This approach works well and documents can be validated by common XML
parser. It is even not necessary to declare MathML namespace because all
MathML elements get this information from #FIXED attribute. This is
useful because most XML validating parsers are confused by using
xmlns:mml on DocBook elements because this is not attribute declared in
DocBook DTD.
What is your experience with MathML module? Am I doing something wrong,
or is current DocBook MathML support not so correct.
Jirka
-----------------------------------------------------------------
Jirka Kosek
e-mail: jirka@kosek.cz
http://www.kosek.cz