]> git.stg.codes - stg.git/blob - doc/xslt/slides/fo/plain-titlepage.xsl
Set output encoding to utf-8.
[stg.git] / doc / xslt / slides / fo / plain-titlepage.xsl
1 <?xml version="1.0"?>
2
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" version="1.0" exclude-result-prefixes="exsl">
4
5 <!-- This stylesheet was created by template/titlepage.xsl-->
6
7 <xsl:template name="slides.titlepage.recto">
8   <xsl:choose>
9     <xsl:when test="slidesinfo/title">
10       <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="slidesinfo/title[1]"/>
11     </xsl:when>
12     <xsl:when test="docinfo/title">
13       <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="docinfo/title[1]"/>
14     </xsl:when>
15     <xsl:when test="info/title">
16       <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="info/title[1]"/>
17     </xsl:when>
18     <xsl:when test="title">
19       <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="title[1]"/>
20     </xsl:when>
21   </xsl:choose>
22
23   <xsl:choose>
24     <xsl:when test="slidesinfo/subtitle">
25       <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="slidesinfo/subtitle[1]"/>
26     </xsl:when>
27     <xsl:when test="docinfo/subtitle">
28       <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="docinfo/subtitle[1]"/>
29     </xsl:when>
30     <xsl:when test="info/subtitle">
31       <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="info/subtitle[1]"/>
32     </xsl:when>
33     <xsl:when test="subtitle">
34       <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="subtitle[1]"/>
35     </xsl:when>
36   </xsl:choose>
37
38   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="slidesinfo/corpauthor"/>
39   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
40   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="info/corpauthor"/>
41   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="slidesinfo/authorgroup"/>
42   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
43   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="info/authorgroup"/>
44   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="slidesinfo/author"/>
45   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="docinfo/author"/>
46   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="info/author"/>
47   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="slidesinfo/pubdate"/>
48   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
49   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="info/pubdate"/>
50   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="slidesinfo/confgroup"/>
51   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="docinfo/confgroup"/>
52   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="info/confgroup"/>
53   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="slidesinfo/releaseinfo"/>
54   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
55   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="info/releaseinfo"/>
56   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="slidesinfo/copyright"/>
57   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="docinfo/copyright"/>
58   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="info/copyright"/>
59   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="slidesinfo/revision"/>
60   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="docinfo/revision"/>
61   <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="info/revision"/>
62 </xsl:template>
63
64 <xsl:template name="slides.titlepage.verso">
65 </xsl:template>
66
67 <xsl:template name="slides.titlepage.separator">
68 </xsl:template>
69
70 <xsl:template name="slides.titlepage.before.recto">
71 </xsl:template>
72
73 <xsl:template name="slides.titlepage.before.verso">
74 </xsl:template>
75
76 <xsl:template name="slides.titlepage">
77   <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
78     <xsl:variable name="recto.content">
79       <xsl:call-template name="slides.titlepage.before.recto"/>
80       <xsl:call-template name="slides.titlepage.recto"/>
81     </xsl:variable>
82     <xsl:variable name="recto.elements.count">
83       <xsl:choose>
84         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
85         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
86           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
87         <xsl:otherwise>1</xsl:otherwise>
88       </xsl:choose>
89     </xsl:variable>
90     <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
91       <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
92     </xsl:if>
93     <xsl:variable name="verso.content">
94       <xsl:call-template name="slides.titlepage.before.verso"/>
95       <xsl:call-template name="slides.titlepage.verso"/>
96     </xsl:variable>
97     <xsl:variable name="verso.elements.count">
98       <xsl:choose>
99         <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
100         <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
101           <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
102         <xsl:otherwise>1</xsl:otherwise>
103       </xsl:choose>
104     </xsl:variable>
105     <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
106       <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
107     </xsl:if>
108     <xsl:call-template name="slides.titlepage.separator"/>
109   </fo:block>
110 </xsl:template>
111
112 <xsl:template match="*" mode="slides.titlepage.recto.mode">
113   <!-- if an element isn't found in this mode, -->
114   <!-- try the generic titlepage.mode -->
115   <xsl:apply-templates select="." mode="titlepage.mode"/>
116 </xsl:template>
117
118 <xsl:template match="*" mode="slides.titlepage.verso.mode">
119   <!-- if an element isn't found in this mode, -->
120   <!-- try the generic titlepage.mode -->
121   <xsl:apply-templates select="." mode="titlepage.mode"/>
122 </xsl:template>
123
124 <xsl:template match="title" mode="slides.titlepage.recto.auto.mode">
125 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="slides.titlepage.recto.style" text-align="center" space-after="1em" padding-top="1.5in" keep-with-next="always" font-size="{$foil.title.size}" font-weight="bold" font-family="{$slide.title.font.family}">
126 <xsl:call-template name="component.title">
127 <xsl:with-param name="node" select="ancestor-or-self::slides[1]"/>
128 </xsl:call-template>
129 </fo:block>
130 </xsl:template>
131
132 <xsl:template match="subtitle" mode="slides.titlepage.recto.auto.mode">
133 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="slides.titlepage.recto.style" text-align="center" space-after="1em" font-family="{$slide.title.font.family}">
134 <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
135 </fo:block>
136 </xsl:template>
137
138 <xsl:template match="corpauthor" mode="slides.titlepage.recto.auto.mode">
139 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="slides.titlepage.recto.style" font-size="20.736pt" text-align="center" space-after="1em">
140 <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
141 </fo:block>
142 </xsl:template>
143
144 <xsl:template match="authorgroup" mode="slides.titlepage.recto.auto.mode">
145 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="slides.titlepage.recto.style">
146 <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
147 </fo:block>
148 </xsl:template>
149
150 <xsl:template match="author" mode="slides.titlepage.recto.auto.mode">
151 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="slides.titlepage.recto.style" font-size="20.736pt" text-align="center" space-after="1em">
152 <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
153 </fo:block>
154 </xsl:template>
155
156 <xsl:template match="pubdate" mode="slides.titlepage.recto.auto.mode">
157 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="slides.titlepage.recto.style" font-size="17.28pt" text-align="center" space-after="1em">
158 <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
159 </fo:block>
160 </xsl:template>
161
162 <xsl:template match="confgroup" mode="slides.titlepage.recto.auto.mode">
163 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="slides.titlepage.recto.style" font-size="17.28pt" text-align="center" space-after="1em">
164 <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
165 </fo:block>
166 </xsl:template>
167
168 <xsl:template match="releaseinfo" mode="slides.titlepage.recto.auto.mode">
169 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="slides.titlepage.recto.style" font-size="17.28pt" text-align="center" space-after="1em">
170 <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
171 </fo:block>
172 </xsl:template>
173
174 <xsl:template match="copyright" mode="slides.titlepage.recto.auto.mode">
175 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="slides.titlepage.recto.style" font-size="17.28pt" text-align="center">
176 <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
177 </fo:block>
178 </xsl:template>
179
180 <xsl:template match="revision" mode="slides.titlepage.recto.auto.mode">
181 <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="slides.titlepage.recto.style" text-align="center">
182 <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
183 </fo:block>
184 </xsl:template>
185
186 </xsl:stylesheet>
187