Normal users are not supposed to do this. The intended audience for this appendix is consultants and local gurus.
What follows is a description of what has been done to integrate MathML with DocBook 5. Integrating MathML with other document types should be very similar.
Customize the configuration by first including the original configuration, as explained in XMLmind XML Editor - Configuration and Deployment.
<configuration name="DocBook v5+" xmlns="http://www.xmlmind.com/xmleditor/schema/configuration" xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration" xmlns:db="http://docbook.org/ns/docbook" xmlns:mml="http://www.w3.org/1998/Math/MathML"> <include location="xxe-config:docbook5/docbook5.xxe" /> <validate namespace="http://www.w3.org/1998/Math/MathML"><relaxng location="../common_rng/mathml2.rng" /> </validate> <css name="DocBook" location="css/docbook5.css" />
... <include location="../common/mathml.incl" />
... <elementTemplate name="mathml">
<equation xmlns="http://docbook.org/ns/docbook"> <title></title> <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="block"> <mml:mi></mml:mi> </mml:math> </equation> </elementTemplate>
Dynamically merge the RELAX NG schema of MathML presentation markup ( | |
Specify a CSS style sheet merging the original CSS style sheet with the MathML one. See below. | |
Include the MathML configuration. | |
Specify one or more templates for elements embedding MathML elements. |
Here's how the MathML schema has been dynamically merged with the DocBook 5 schema.
The RELAX NG schema of DocBook 5 is declared in the stock DocBook 5 configuration xxe-config:docbook5/docbook5.xxe
("xxe-config:
" resolves to
).XXE_install_dir
/addon/config/
<relaxng location="rng/V5.0/docbook.rng" />
The validate
configuration element allows to merge one or more auxiliary DTDs or schemas to the main DTD or schema.
<validate namespace="http://www.w3.org/1998/Math/MathML">
<relaxng location="../common_rng/mathml2.rng" />
</validate>
You'll find:
the W3C XML Schema for MathML (both presentation and content markup) in
,mathml_addon_install_dir
/standalone/xsd/mathml2.xsd
the RELAX NG schema for MathML (presentation markup only) in
,mathml_addon_install_dir
/common_rng/mathml2.rng
the RELAX NG schema Compact Syntax for MathML (presentation markup only) in
.mathml_addon_install_dir
/common/pane/mathml2.rnc
Both mathml2.rng
and mathml2.rnc
have been translated from the MathML DTD using trang.
However nothing forces you to merge schemas of the same kind. More information in XMLmind XML Editor - Configuration and Deployment.
Here's how the MathML CSS style sheet has been merged to the DocBook 5 CSS style sheet:
@import url(xxe-config:docbook5/css/docbook5.css); @import url(../../common/mathml.css); db5|imagedata:contains-element(mml|math), inlineequation > mml|math, informalequation > mml|math, equation > mml|math { content: ""; }