This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.
[ira/wip.git] / docs / docbook / xslt / db2latex / preface.mod.xsl
1 <?xml version='1.0'?>
2 <!--############################################################################# 
3 |       $Id: preface.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="preface" xmlns="">
20         <referenceinfo>
21             <releaseinfo role="meta">
22                 $Id: preface.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>Preface <filename>preface.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  |  Preface 
45  +- ############################################################################# -->
46 <xsl:template match="preface">
47 <xsl:text>\newpage&#10;</xsl:text>
48 <xsl:text>% -------------------------------------------------------------&#10;</xsl:text>
49 <xsl:text>% Preface                                                      &#10;</xsl:text>
50 <xsl:text>% -------------------------------------------------------------&#10;</xsl:text>
51 <xsl:text>\chapter*{</xsl:text>
52 <!-- Output preface title or generic text -->
53 <xsl:choose>
54         <xsl:when test="title">
55                 <xsl:apply-templates select="title"/>
56         </xsl:when>
57         <xsl:otherwise>
58         <xsl:call-template name="gentext">
59                 <xsl:with-param name="key">preface</xsl:with-param>
60         </xsl:call-template>
61         </xsl:otherwise>
62 </xsl:choose>
63 <xsl:text>}&#10;</xsl:text>
64 <!-- done with title. Tag it. -->
65 <xsl:call-template name="label.id"/>
66 <!-- except title, titleabbrev and subtitle -->
67 <xsl:apply-templates select="*[name(.) != 'title' and name(.) != 'subtitle' and name(.) != 'titleabbrev']"/>
68 </xsl:template>
69
70
71 <!--############################################################################# 
72  |  Preface Title 
73  +- ############################################################################# -->
74 <xsl:template match="preface/title">
75 <xsl:apply-templates/>
76 </xsl:template>
77
78
79 <!--############################################################################# 
80  |  Other Preface Elements 
81  +- ############################################################################# -->
82 <xsl:template match="preface/titleabbrev"/>
83 <xsl:template match="preface/subtitle"/>
84 <xsl:template match="preface/docinfo|prefaceinfo"/>
85
86
87 <xsl:template match="preface/sect1|preface/simplesect">
88 <xsl:text>&#10;\section*{</xsl:text>
89 <xsl:apply-templates select="title"/>
90 <xsl:text>}&#10;</xsl:text>
91 <xsl:apply-templates select="*[name(.) != 'title']"/>
92 </xsl:template>
93
94
95 <xsl:template match="preface/sect1/sect2">
96 <xsl:text>&#10;\subsection*{</xsl:text>
97 <xsl:apply-templates select="title"/>
98 <xsl:text>}&#10;</xsl:text>
99 <xsl:apply-templates select="*[name(.) != 'title']"/>
100 </xsl:template>
101
102
103 <xsl:template match="preface/sect1/sect2/sect3">
104 <xsl:text>&#10;\subsubsection*{</xsl:text>
105 <xsl:apply-templates select="title"/>
106 <xsl:text>}&#10;</xsl:text>
107 <xsl:apply-templates select="*[name(.) != 'title']"/>
108 </xsl:template>
109
110
111 </xsl:stylesheet>
112