diff options
author | Alexander Bokovoy <ab@samba.org> | 2007-11-27 15:47:55 +0000 |
---|---|---|
committer | Gerald W. Carter <jerry@samba.org> | 2008-04-23 08:47:40 -0500 |
commit | 0a6fea6796e0da0d5c8690c851f2723e4b385ba7 (patch) | |
tree | 18a0bf743f818490dbbce188b06796d4f1d3eec4 /docs/xslt/db2latex-xsl/xsl/mathml/mathml.mod.xsl | |
parent | 754a2e1494f14fd5d0f157b0f0eada0d13fb80c0 (diff) | |
download | samba-0a6fea6796e0da0d5c8690c851f2723e4b385ba7.tar.gz samba-0a6fea6796e0da0d5c8690c851f2723e4b385ba7.tar.bz2 samba-0a6fea6796e0da0d5c8690c851f2723e4b385ba7.zip |
Embed db2latex as interim solution before migration to dblatex
(This used to be commit 166c61077bc5c6ca238865f71687369ad7c35a07)
Diffstat (limited to 'docs/xslt/db2latex-xsl/xsl/mathml/mathml.mod.xsl')
-rw-r--r-- | docs/xslt/db2latex-xsl/xsl/mathml/mathml.mod.xsl | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/docs/xslt/db2latex-xsl/xsl/mathml/mathml.mod.xsl b/docs/xslt/db2latex-xsl/xsl/mathml/mathml.mod.xsl new file mode 100644 index 0000000000..32262afab4 --- /dev/null +++ b/docs/xslt/db2latex-xsl/xsl/mathml/mathml.mod.xsl @@ -0,0 +1,48 @@ +<?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.4 2004/01/18 10:39:23 j-devenish Exp $ + |- ############################################################################# + | $Author: j-devenish $ + | + | 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> |