2
<!DOCTYPE xsl:stylesheet
4
<!ENTITY % mmlalias PUBLIC "MathML alias" "ent/mmlalias.ent"> %mmlalias;
5
<!ENTITY % mmlextra PUBLIC "MathML extra" "ent/mmlextra.ent"> %mmlextra;
7
<!--#############################################################################
8
| $Id: mathml.mod.xsl,v 1.4 2004/01/18 10:39:23 j-devenish Exp $
9
|- #############################################################################
10
| $Author: j-devenish $
12
| PURPOSE: MathML presentation and content markup.
13
| Note: these elements are not part of the DocBook DTD. I have extended
14
| the docbook DTD in order to support this tags, so that's why I have these
17
| MathML namespace used -> mml
18
+ ############################################################################## -->
20
<xsl:stylesheet version='1.0'
21
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
22
xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns="http://www.w3.org/1998/Math/MathML">
24
<xsl:strip-space elements="mml:math mml:mrow"/>
26
<xsl:template match="mml:math">
27
<xsl:text>\begin{displaymath}</xsl:text>
28
<xsl:apply-templates/>
29
<xsl:text>\end{displaymath}% </xsl:text>
32
<xsl:template match="mml:math[@mode='inline']">
33
<xsl:text>\begin{math}</xsl:text>
34
<xsl:apply-templates/>
35
<xsl:text>\end{math}</xsl:text>
38
<xsl:template match="mml:math[@mode='display']">
39
<xsl:text>\begin{displaymath}</xsl:text>
40
<xsl:apply-templates/>
41
<xsl:text>\end{displaymath}% </xsl:text>
44
<xsl:template match="p">
45
<xsl:text>\section{</xsl:text> <xsl:value-of select="normalize-space(.)"/> <xsl:text>} </xsl:text>