diff options
author | Alexander Bokovoy <ab@samba.org> | 2003-04-30 21:39:49 +0000 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2003-04-30 21:39:49 +0000 |
commit | bd30b6066f1a28663b28466a67064149b6e060a4 (patch) | |
tree | dc4478c5aafd9078f380e5e2ea11926519905fb0 /docs/docbook/xslt/db2latex/mathml/mathml.mod.xsl | |
parent | 049791de5b6e43e827e2be01a65958389d9c76e2 (diff) | |
download | samba-bd30b6066f1a28663b28466a67064149b6e060a4.tar.gz samba-bd30b6066f1a28663b28466a67064149b6e060a4.tar.bz2 samba-bd30b6066f1a28663b28466a67064149b6e060a4.zip |
Docbook XML conversion: XSLT and build infrastructure
(This used to be commit f4f6e0b29e744077dfb836745716a659a49d7529)
Diffstat (limited to 'docs/docbook/xslt/db2latex/mathml/mathml.mod.xsl')
-rw-r--r-- | docs/docbook/xslt/db2latex/mathml/mathml.mod.xsl | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/docs/docbook/xslt/db2latex/mathml/mathml.mod.xsl b/docs/docbook/xslt/db2latex/mathml/mathml.mod.xsl new file mode 100644 index 0000000000..c87b4ef7f6 --- /dev/null +++ b/docs/docbook/xslt/db2latex/mathml/mathml.mod.xsl @@ -0,0 +1,51 @@ +<?xml version='1.0'?> +<!DOCTYPE xsl:stylesheet +[ + <!ENTITY % mmlalias PUBLIC "MathML alias" "ent/mmlalias.ent"> %mmlalias; + <!ENTITY % mmlextra PUBLIC "MathML extra" "ent/mmlextra.ent"> %mmlextra; +]> +<!--############################################################################# + | $Id: mathml.mod.xsl,v 1.1 2003/04/30 21:39:49 ab Exp $ + |- ############################################################################# + | $Author: ab $ + | + | PURPOSE: MathML presentation and content markup. + | Note: these elements are not part of the DocBook DTD. I have extended + | the docbook DTD in order to support this tags, so that's why I have these + | templates here. + | + | MathML namespace used -> mml + + ############################################################################## --> + +<xsl:stylesheet version='1.0' + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns="http://www.w3.org/1998/Math/MathML"> + +<xsl:strip-space elements="mml:math mml:mrow"/> + + +<xsl:template match="mml:math"> + <xsl:text>
\begin{displaymath}
</xsl:text> + <xsl:apply-templates/> + <xsl:text>
\end{displaymath}
</xsl:text> +</xsl:template> + +<xsl:template match="mml:math[@mode='inline']"> + <xsl:text> \begin{math} </xsl:text> + <xsl:apply-templates/> + <xsl:text> \end{math} </xsl:text> +</xsl:template> + +<xsl:template match="mml:math[@mode='display']"> + <xsl:text>
\begin{displaymath}
</xsl:text> + <xsl:apply-templates/> + <xsl:text>
\end{displaymath}
</xsl:text> +</xsl:template> + + +<xsl:template match="p"> + <xsl:text>\section{</xsl:text> <xsl:value-of select="normalize-space(.)"/> <xsl:text>}
</xsl:text> +</xsl:template> + + +</xsl:stylesheet> |