66e7089413ec10a5db1b09f2bc611b7d847dc7b5
[abartlet/samba.git/.git] / docs / docbook / xslt / db2latex / mathelem.mod.xsl
1 <?xml version='1.0'?>
2 <!--############################################################################# 
3 |       $Id: mathelem.mod.xsl,v 1.1 2003/04/30 21:39:49 ab Exp $                
4 |- #############################################################################
5 |       $Author: ab $                                                                                           
6 |                                                                                                               
7 |   PURPOSE: Math Elements as theorems, lemmas, propositions, etc.
8 |       Note: these elements are not part of the DocBook DTD. I have extended
9 |    the docbook DTD in order to support this tags, so that's why I have these 
10 |       templates here.
11 + ############################################################################## -->
12
13 <xsl:stylesheet 
14     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
15     xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
16     exclude-result-prefixes="doc" version='1.0'>
17
18
19
20     <!--############################################################################# -->
21     <!-- DOCUMENTATION                                                                -->
22     <doc:reference id="mathelems" xmlns="">
23         <referenceinfo>
24             <releaseinfo role="meta">
25                 $Id: mathelem.mod.xsl,v 1.1 2003/04/30 21:39:49 ab Exp $
26             </releaseinfo>
27         <authorgroup>
28             <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
29             <author> <firstname>James</firstname> <surname>Devenish</surname> </author>
30         </authorgroup>
31             <copyright>
32                 <year>2000</year> <year>2001</year> <year>2002</year> <year>2003</year>
33                 <holder>Ramon Casellas</holder>
34             </copyright>
35         </referenceinfo>
36
37         <title>Math Elements <filename>mathelems.mod.xsl</filename></title>
38         <partintro>
39             <section><title>Introduction</title>
40                 <para></para>
41             </section>
42         </partintro>
43     </doc:reference>
44
45
46
47
48     <xsl:template match="mathelement">
49         <xsl:apply-templates/>
50     </xsl:template>
51
52
53     <!--
54     ##########################################
55     #
56     #  \begin{hypothesis}[title]
57     #
58     #  \end{hypothesis}
59     #
60     ##########################################
61     -->
62     <xsl:template match="mathelement/mathhypothesis">
63         <xsl:text>\begin{hypothesis}[</xsl:text>
64         <xsl:call-template name="normalize-scape">
65             <xsl:with-param name="string" select="title"/> 
66         </xsl:call-template>
67         <xsl:text>]&#10;</xsl:text>
68         <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
69         <xsl:apply-templates/>
70         <xsl:text>\end{rem}&#10;</xsl:text>
71     </xsl:template>
72
73     <!--
74     ##########################################
75     #
76     #  \begin{rem}[title]
77     #
78     #  \end{rem}
79     #
80     ##########################################
81     -->
82     <xsl:template match="mathelement/mathremark">
83         <xsl:text>\begin{rem}[</xsl:text>
84         <xsl:call-template name="normalize-scape">
85             <xsl:with-param name="string" select="title"/> 
86         </xsl:call-template>
87         <xsl:text>]&#10;</xsl:text>
88         <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
89         <xsl:apply-templates/>
90         <xsl:text>\end{rem}&#10;</xsl:text>
91     </xsl:template>
92
93
94     <!--
95     ##########################################
96     #
97     #  \begin{exm}[title]
98     #
99     #  \end{exm}
100     #
101     ##########################################
102     -->
103     <xsl:template match="mathelement/mathexample">
104         <xsl:text>\begin{exm}[</xsl:text>
105         <xsl:call-template name="normalize-scape">
106             <xsl:with-param name="string" select="title"/> 
107         </xsl:call-template>
108         <xsl:text>]&#10;</xsl:text>
109         <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
110         <xsl:apply-templates/>
111         <xsl:text>\end{exm}&#10;</xsl:text>
112     </xsl:template>
113
114
115     <!--
116     ##########################################
117     #
118     #  \begin{prop}[title]
119     #
120     #  \end{prop}
121     #
122     ##########################################
123     -->
124     <xsl:template match="mathelement/mathproposition">
125         <xsl:text>\begin{prop}[</xsl:text>
126         <xsl:call-template name="normalize-scape">
127             <xsl:with-param name="string" select="title"/> 
128         </xsl:call-template>
129         <xsl:text>]&#10;</xsl:text>
130         <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
131         <xsl:apply-templates/>
132         <xsl:text>\end{prop}&#10;</xsl:text>
133     </xsl:template>
134
135
136     <!--
137     ##########################################
138     #
139     #  \begin{thm}[title]
140     #
141     #  \end{thm}
142     #
143     ##########################################
144     -->
145     <xsl:template match="mathelement/maththeorem">
146         <xsl:text>\begin{thm}[</xsl:text>
147         <xsl:call-template name="normalize-scape">
148             <xsl:with-param name="string" select="title"/> 
149         </xsl:call-template>
150         <xsl:text>]&#10;</xsl:text>
151         <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
152         <xsl:apply-templates/>
153         <xsl:text>\end{thm}&#10;</xsl:text>
154     </xsl:template>
155
156
157
158     <!--
159     ##########################################
160     #
161     #  \begin{defn}[definition title]
162     #
163     #  \end{defn}
164     #
165     ##########################################
166     -->
167     <xsl:template match="mathelement/mathdefinition">
168         <xsl:text>\begin{defn}[</xsl:text>
169         <xsl:call-template name="normalize-scape">
170             <xsl:with-param name="string" select="title"/> 
171         </xsl:call-template>
172         <xsl:text>]&#10;</xsl:text>
173         <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
174         <xsl:apply-templates/>
175         <xsl:text>\end{defn}&#10;</xsl:text>
176     </xsl:template>
177
178
179
180     <!--
181     ##########################################
182     #
183     #  \begin{lem}[lemma title]
184     #
185     #  \end{lem}
186     #
187     ##########################################
188     -->
189     <xsl:template match="mathelement/mathlemma">
190         <xsl:text>\begin{lem}[</xsl:text>
191         <xsl:call-template name="normalize-scape">
192             <xsl:with-param name="string" select="title"/> 
193         </xsl:call-template>
194         <xsl:text>]&#10;</xsl:text>
195         <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
196         <xsl:apply-templates/>
197         <xsl:text>\end{lem}&#10;</xsl:text>
198     </xsl:template>
199
200
201     <!--
202     ##########################################
203     #
204     #  \begin{proof}
205     #
206     #  \end{proof}
207     #
208     ##########################################
209     -->
210     <xsl:template match="mathproof">
211         <xsl:text>\begin{proof}</xsl:text>
212         <xsl:variable name="id"> <xsl:call-template name="label.id"/> </xsl:variable>
213         <xsl:apply-templates/>
214         <xsl:text>\end{proof}&#10;</xsl:text>
215     </xsl:template>
216
217
218     <xsl:template match="mathphrase|mathcondition|mathassertion">
219         <xsl:apply-templates/>
220     </xsl:template>
221
222     <xsl:template match="mathelement/*/title">
223     </xsl:template>
224
225 </xsl:stylesheet>