trying to get HEAD building again. If you want the code
[tprouty/samba.git] / docs / docbook / xslt / db2latex / pi.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     <!--############################################################################# -->
17     <!-- DOCUMENTATION                                                                -->
18     <doc:reference id="abstract" xmlns="">
19         <referenceinfo>
20             <releaseinfo role="meta">
21             </releaseinfo>
22         <authorgroup>
23             <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
24             <author> <firstname>James</firstname> <surname>Devenish</surname> </author>
25         </authorgroup>
26             <copyright>
27                 <year>2000</year> <year>2001</year><year>2002</year><year>2003</year>
28                 <holder>Ramon Casellas</holder>
29             </copyright>
30         </referenceinfo>
31
32         <title>Processing Instructions</title>
33
34         <partintro>
35             <section><title>Introduction</title>
36                 <para></para>
37             </section>
38         </partintro>
39     </doc:reference>
40
41
42     <doc:template match="processing-instruction()" xmlns="">
43         <refpurpose> Processing Instruction XSL template.  </refpurpose>
44         <refdescription>
45         </refdescription>
46     </doc:template>
47
48
49     <xsl:template match="processing-instruction()">
50     </xsl:template>
51
52     <xsl:template match="processing-instruction('rcas')">
53         <xsl:processing-instruction name="dbhtml">
54             <xsl:value-of select="."/>
55         </xsl:processing-instruction>
56     </xsl:template>
57
58     <xsl:template match="processing-instruction('db2latex')">
59     </xsl:template>
60
61
62
63
64     <xsl:template name="process.cmdsynopsis.list">
65         <xsl:param name="cmdsynopses"/><!-- empty node list by default -->
66         <xsl:param name="count" select="1"/>
67
68         <xsl:choose>
69             <xsl:when test="$count>count($cmdsynopses)"></xsl:when>
70             <xsl:otherwise>
71                 <xsl:variable name="cmdsyn" select="$cmdsynopses[$count]"/>
72
73                 <dt>
74                     <a>
75                         <xsl:attribute name="href">
76                             <xsl:call-template name="label.id">
77                                 <xsl:with-param name="object" select="$cmdsyn"/>
78                             </xsl:call-template>
79                         </xsl:attribute>
80
81                         <xsl:choose>
82                             <xsl:when test="$cmdsyn/@xreflabel">
83                                 <xsl:call-template name="xref.xreflabel">
84                                     <xsl:with-param name="target" select="$cmdsyn"/>
85                                 </xsl:call-template>
86                             </xsl:when>
87                             <xsl:otherwise>
88                                 <!-- RCAS Fixme 
89                                 <xsl:call-template name="xref.cmdsynopsis">
90                                     <xsl:with-param name="target" select="$cmdsyn"/>
91                                 </xsl:call-template>-->
92                             </xsl:otherwise>
93                         </xsl:choose>
94                     </a>
95                 </dt>
96
97                 <xsl:call-template name="process.cmdsynopsis.list">
98                     <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
99                     <xsl:with-param name="count" select="$count+1"/>
100                 </xsl:call-template>
101             </xsl:otherwise>
102         </xsl:choose>
103     </xsl:template>
104
105     <xsl:template match="processing-instruction('dbcmdlist')">
106         <xsl:variable name="cmdsynopses" select="..//cmdsynopsis"/>
107
108         <xsl:if test="count($cmdsynopses)&lt;1">
109             <xsl:message><xsl:text>No cmdsynopsis elements matched dbcmdlist PI, perhaps it's nested too deep?</xsl:text>
110             </xsl:message>
111         </xsl:if>
112
113         <dl>
114             <xsl:call-template name="process.cmdsynopsis.list">
115                 <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
116             </xsl:call-template>
117         </dl>
118     </xsl:template>
119
120     <!-- ==================================================================== -->
121
122     <xsl:template name="process.funcsynopsis.list">
123         <xsl:param name="funcsynopses"/><!-- empty node list by default -->
124         <xsl:param name="count" select="1"/>
125
126         <xsl:choose>
127             <xsl:when test="$count>count($funcsynopses)"></xsl:when>
128             <xsl:otherwise>
129                 <xsl:variable name="cmdsyn" select="$funcsynopses[$count]"/>
130
131                 <dt>
132                     <a>
133                         <xsl:attribute name="href">
134                             <xsl:call-template name="label.id">
135                                 <xsl:with-param name="object" select="$cmdsyn"/>
136                             </xsl:call-template>
137                         </xsl:attribute>
138
139                         <xsl:choose>
140                             <xsl:when test="$cmdsyn/@xreflabel">
141                                 <xsl:call-template name="xref.xreflabel">
142                                     <xsl:with-param name="target" select="$cmdsyn"/>
143                                 </xsl:call-template>
144                             </xsl:when>
145                             <xsl:otherwise>
146                                 <!-- RCAS Fixme 
147                                 <xsl:call-template name="xref.funcsynopsis">
148                                     <xsl:with-param name="target" select="$cmdsyn"/>
149                                 </xsl:call-template>
150                                 -->
151                             </xsl:otherwise>
152                         </xsl:choose>
153                     </a>
154                 </dt>
155
156                 <xsl:call-template name="process.funcsynopsis.list">
157                     <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
158                     <xsl:with-param name="count" select="$count+1"/>
159                 </xsl:call-template>
160             </xsl:otherwise>
161         </xsl:choose>
162     </xsl:template>
163
164     <xsl:template match="processing-instruction('dbfunclist')">
165         <xsl:variable name="funcsynopses" select="..//funcsynopsis"/>
166
167         <xsl:if test="count($funcsynopses)&lt;1">
168             <xsl:message><xsl:text>No funcsynopsis elements matched dbfunclist PI, perhaps it's nested too deep?</xsl:text>
169             </xsl:message>
170         </xsl:if>
171
172         <dl>
173             <xsl:call-template name="process.funcsynopsis.list">
174                 <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
175             </xsl:call-template>
176         </dl>
177     </xsl:template>
178
179     <!-- ==================================================================== -->
180
181 </xsl:stylesheet>