6f67df52bf52cd87c364feb39d07c718c32668b2
[gd/samba-autobuild/.git] / docs / docbook / xslt / db2latex / example.mod.xsl
1 <?xml version='1.0'?>
2 <!--############################################################################# 
3 |       $Id: example.mod.xsl,v 1.1 2003/04/30 21:39:49 ab Exp $
4 |- #############################################################################
5 |       $Author: ab $
6 |                                                                                                               
7 |   PURPOSE:
8 + ############################################################################## -->
9
10 <xsl:stylesheet 
11     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
12     xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
13     exclude-result-prefixes="doc" version='1.0'>
14
15
16
17     <!--############################################################################# -->
18     <!-- DOCUMENTATION                                                                -->
19     <doc:reference id="example" xmlns="">
20         <referenceinfo>
21             <releaseinfo role="meta">
22                 $Id: example.mod.xsl,v 1.1 2003/04/30 21:39:49 ab Exp $
23             </releaseinfo>
24         <authorgroup>
25             <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
26             <author> <firstname>James</firstname> <surname>Devenish</surname> </author>
27         </authorgroup>
28             <copyright>
29                 <year>2000</year> <year>2001</year> <year>2002</year> <year>2003</year>
30                 <holder>Ramon Casellas</holder>
31             </copyright>
32         </referenceinfo>
33
34         <title>Example <filename>example.mod.xsl</filename></title>
35         <partintro>
36             <section><title>Introduction</title>
37                 <para></para>
38             </section>
39         </partintro>
40     </doc:reference>
41
42
43
44     <xsl:template match="example">
45         <xsl:variable name="placement">
46                 <xsl:call-template name="generate.formal.title.placement">
47                         <xsl:with-param name="object" select="local-name(.)" />
48                 </xsl:call-template>
49         </xsl:variable>
50         <xsl:variable name="caption">
51                 <xsl:text>\caption{</xsl:text>
52                 <xsl:apply-templates select="title" mode="caption.mode"/>
53                 <xsl:text>}&#10;</xsl:text>
54         </xsl:variable>
55         <xsl:call-template name="map.begin"/>
56         <xsl:if test="$placement='before'">
57                 <xsl:text>\captionswapskip{}</xsl:text>
58                 <xsl:value-of select="$caption" />
59                 <xsl:text>\captionswapskip{}</xsl:text>
60         </xsl:if>
61         <xsl:apply-templates />
62         <xsl:if test="$placement!='before'"><xsl:value-of select="$caption" /></xsl:if>
63         <xsl:call-template name="map.end"/>
64     </xsl:template>
65
66
67
68     <xsl:template match="example/title"></xsl:template>
69
70
71
72
73     <xsl:template match="informalexample">
74         <xsl:call-template name="informal.object"/>
75     </xsl:template>
76
77
78
79 </xsl:stylesheet>