trying to get HEAD building again. If you want the code
[abartlet/samba.git/.git] / docs / docbook / xslt / db2latex / procedure.mod.xsl
1 <?xml version='1.0'?>
2 <!--############################################################################# 
3 |- #############################################################################
4 |                                                                                                               
5 |   PURPOSE:
6 + ############################################################################## -->
7
8 <xsl:stylesheet 
9     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10     xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
11     exclude-result-prefixes="doc" version='1.0'>
12
13
14
15     <!--############################################################################# -->
16     <!-- DOCUMENTATION                                                                -->
17     <doc:reference id="procedure" xmlns="">
18         <referenceinfo>
19             <releaseinfo role="meta">
20             </releaseinfo>
21         <authorgroup>
22             <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
23             <author> <firstname>James</firstname> <surname>Devenish</surname> </author>
24         </authorgroup>
25             <copyright>
26                 <year>2000</year> <year>2001</year> <year>2002</year> <year>2003</year>
27                 <holder>Ramon Casellas</holder>
28             </copyright>
29         </referenceinfo>
30
31         <title>Procedures <filename>procedure.mod.xsl</filename></title>
32         <partintro>
33             <section><title>Introduction</title>
34                 <para></para>
35             </section>
36         </partintro>
37     </doc:reference>
38
39
40
41
42
43 <!--############################################################################# -->
44 <doc:template match="procedure" xmlns="">
45 <refpurpose>Procedure XSL Template.</refpurpose>
46 <refdescription>
47 <para></para>
48 <programlisting><![CDATA[
49 ]]></programlisting>
50 </refdescription>
51 </doc:template>
52 <!--############################################################################# -->
53
54 <xsl:template match="procedure">
55         <xsl:variable name="placement">
56                 <xsl:call-template name="generate.formal.title.placement">
57                         <xsl:with-param name="object" select="local-name(.)" />
58                 </xsl:call-template>
59         </xsl:variable>
60         <xsl:choose>
61         <xsl:when test="$placement='before' or $placement=''">
62                 <xsl:apply-templates select="title" mode="procedure.title"/>
63                 <xsl:text>\begin{enumerate}&#10;</xsl:text>
64                 <xsl:apply-templates/>
65                 <xsl:text>\end{enumerate}&#10;</xsl:text>
66         </xsl:when>
67         <xsl:otherwise>
68                 <xsl:text>\begin{enumerate}&#10;</xsl:text>
69                 <xsl:apply-templates/>
70                 <xsl:text>\end{enumerate}&#10;</xsl:text>
71                 <xsl:apply-templates select="title" mode="procedure.title"/>
72         </xsl:otherwise>
73         </xsl:choose>
74 </xsl:template>
75
76
77 <xsl:template match="procedure/title">
78 </xsl:template>
79
80 <xsl:template match="procedure/title" mode="procedure.title">
81         <xsl:text>&#10;&#10;{</xsl:text>
82         <xsl:value-of select="$latex.procedure.title.style"/>
83         <xsl:text>{</xsl:text>
84         <xsl:choose>
85                 <xsl:when test="$latex.apply.title.templates=1">
86                         <xsl:apply-templates/>
87                 </xsl:when>
88                 <xsl:otherwise>
89                         <xsl:value-of select="."/>
90                 </xsl:otherwise>
91         </xsl:choose>
92         <xsl:text>}}&#10;</xsl:text>
93 </xsl:template>
94
95
96
97
98 <!--############################################################################# -->
99 <doc:template match="step" xmlns="">
100 <refpurpose>Step XSL Template.</refpurpose>
101 <refdescription>
102 <para></para>
103 <programlisting><![CDATA[
104 ]]></programlisting>
105 </refdescription>
106 </doc:template>
107 <!--############################################################################# -->
108
109     <xsl:template match="step">
110         <xsl:choose>
111             <xsl:when test="title">
112                         <xsl:text>&#10;\item{{</xsl:text>
113                         <xsl:value-of select="$latex.step.title.style"/> <!-- by default \sc -->
114                         <xsl:text>{</xsl:text>
115                         <xsl:apply-templates select="title"/>
116                         <xsl:text>}}&#10;</xsl:text>
117             </xsl:when>
118             <xsl:otherwise>
119                         <xsl:text>&#10;\item{</xsl:text>
120             </xsl:otherwise>
121         </xsl:choose>
122          <xsl:apply-templates select="*[not(self::title)]"/>
123         <xsl:text>}&#10;</xsl:text>
124     </xsl:template>
125
126 <!-- step/title, just apply templates ########################################### -->
127     <xsl:template match="step/title"> 
128                 <xsl:apply-templates/>
129         </xsl:template>
130
131
132
133
134
135
136
137
138
139 <!--############################################################################# -->
140 <doc:template match="substeps" xmlns="">
141 <refpurpose>SubSteps XSL Template.</refpurpose>
142 <refdescription>
143 <para></para>
144 <programlisting><![CDATA[
145 <xsl:template match="substeps">
146         <xsl:text>\begin{enumerate}&#10;</xsl:text>
147         <xsl:apply-templates/>
148         <xsl:text>\end{enumerate}&#10;</xsl:text>
149 </xsl:template>
150 ]]></programlisting>
151 </refdescription>
152 </doc:template>
153 <!--############################################################################# -->
154
155 <xsl:template match="substeps">
156         <xsl:text>\begin{enumerate}&#10;</xsl:text>
157         <xsl:apply-templates/>
158         <xsl:text>\end{enumerate}&#10;</xsl:text>
159 </xsl:template>
160
161 </xsl:stylesheet>
162