trying to get HEAD building again. If you want the code
[tprouty/samba.git] / docs / docbook / xslt / db2latex / mathml / mathml.mod.xsl
1 <?xml version='1.0'?>
2 <!DOCTYPE xsl:stylesheet
3 [
4  <!ENTITY % mmlalias PUBLIC "MathML alias" "ent/mmlalias.ent">  %mmlalias;
5  <!ENTITY % mmlextra PUBLIC "MathML extra" "ent/mmlextra.ent">  %mmlextra;
6 ]>
7 <!--############################################################################# 
8  |- #############################################################################
9  |                                                                                                              
10  |   PURPOSE: MathML presentation and content markup.
11  |      Note: these elements are not part of the DocBook DTD. I have extended
12  |    the docbook DTD in order to support this tags, so that's why I have these 
13  |      templates here.
14  |   
15  |      MathML namespace used -> mml
16  + ############################################################################## -->
17
18 <xsl:stylesheet version='1.0'
19         xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
20         xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns="http://www.w3.org/1998/Math/MathML">
21
22 <xsl:strip-space elements="mml:math mml:mrow"/>
23
24
25 <xsl:template match="mml:math">
26         <xsl:text>\r\begin{displaymath}\r</xsl:text>
27         <xsl:apply-templates/>
28         <xsl:text>\r\end{displaymath}\r</xsl:text>
29 </xsl:template>
30
31 <xsl:template match="mml:math[@mode='inline']">
32         <xsl:text> \begin{math} </xsl:text>
33         <xsl:apply-templates/>
34         <xsl:text> \end{math} </xsl:text>
35 </xsl:template>
36
37 <xsl:template match="mml:math[@mode='display']">
38         <xsl:text>\r\begin{displaymath}\r</xsl:text>
39         <xsl:apply-templates/>
40         <xsl:text>\r\end{displaymath}\r</xsl:text>
41 </xsl:template>
42
43
44 <xsl:template match="p">
45         <xsl:text>\section{</xsl:text> <xsl:value-of select="normalize-space(.)"/> <xsl:text>}\r</xsl:text>
46 </xsl:template>
47
48
49 </xsl:stylesheet>