Debian Codegraph @

docbook-xsl-ns/slides/fo/plain-titlepage.xsl

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook" xmlns:exsl="http://exslt.org/common" xmlns:dbs="http://docbook.org/ns/docbook-slides" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0" exclude-result-prefixes="exsl d">
3
4 <!-- This stylesheet was created by template/titlepage.xsl-->
5
6 <xsl:template name="slides.titlepage.recto">
7 <xsl:choose>
8 <xsl:when test="d:slidesinfo/d:title">
9 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:slidesinfo/d:title"/>
10 </xsl:when>
11 <xsl:when test="d:docinfo/d:title">
12 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:docinfo/d:title"/>
13 </xsl:when>
14 <xsl:when test="d:info/d:title">
15 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:info/d:title"/>
16 </xsl:when>
17 <xsl:when test="d:title">
18 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:title"/>
19 </xsl:when>
20 </xsl:choose>
21
22 <xsl:choose>
23 <xsl:when test="d:slidesinfo/d:subtitle">
24 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:slidesinfo/d:subtitle"/>
25 </xsl:when>
26 <xsl:when test="d:docinfo/d:subtitle">
27 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
28 </xsl:when>
29 <xsl:when test="d:info/d:subtitle">
30 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
31 </xsl:when>
32 <xsl:when test="d:subtitle">
33 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:subtitle"/>
34 </xsl:when>
35 </xsl:choose>
36
37 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:slidesinfo/d:corpauthor"/>
38 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:docinfo/d:corpauthor"/>
39 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
40 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:slidesinfo/d:authorgroup"/>
41 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:docinfo/d:authorgroup"/>
42 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
43 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:slidesinfo/d:author"/>
44 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:docinfo/d:author"/>
45 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:info/d:author"/>
46 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:slidesinfo/d:pubdate"/>
47 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:docinfo/d:pubdate"/>
48 <xsl:apply-templates mode="slides.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
49 </xsl:template>
50
51 <xsl:template name="slides.titlepage.verso">
52 </xsl:template>
53
54 <xsl:template name="slides.titlepage.separator">
55 </xsl:template>
56
57 <xsl:template name="slides.titlepage.before.recto">
58 </xsl:template>
59
60 <xsl:template name="slides.titlepage.before.verso">
61 </xsl:template>
62
63 <xsl:template name="slides.titlepage">
64 <fo:block>
65 <xsl:variable name="recto.content">
66 <xsl:call-template name="slides.titlepage.before.recto"/>
67 <xsl:call-template name="slides.titlepage.recto"/>
68 </xsl:variable>
69 <xsl:variable name="recto.elements.count">
70 <xsl:choose>
71 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
72 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
73 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
74 <xsl:otherwise>1</xsl:otherwise>
75 </xsl:choose>
76 </xsl:variable>
77 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
78 <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
79 </xsl:if>
80 <xsl:variable name="verso.content">
81 <xsl:call-template name="slides.titlepage.before.verso"/>
82 <xsl:call-template name="slides.titlepage.verso"/>
83 </xsl:variable>
84 <xsl:variable name="verso.elements.count">
85 <xsl:choose>
86 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
87 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
88 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
89 <xsl:otherwise>1</xsl:otherwise>
90 </xsl:choose>
91 </xsl:variable>
92 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
93 <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
94 </xsl:if>
95 <xsl:call-template name="slides.titlepage.separator"/>
96 </fo:block>
97 </xsl:template>
98
99 <xsl:template match="*" mode="slides.titlepage.recto.mode">
100 <!-- if an element isn't found in this mode, -->
101 <!-- try the generic titlepage.mode -->
102 <xsl:apply-templates select="." mode="titlepage.mode"/>
103 </xsl:template>
104
105 <xsl:template match="*" mode="slides.titlepage.verso.mode">
106 <!-- if an element isn't found in this mode, -->
107 <!-- try the generic titlepage.mode -->
108 <xsl:apply-templates select="." mode="titlepage.mode"/>
109 </xsl:template>
110
111 <xsl:template match="d:title" mode="slides.titlepage.recto.auto.mode">
112 <fo:block xsl:use-attribute-sets="slides.titlepage.title.properties">
113 <xsl:call-template name="presentation.title">
114 </xsl:call-template>
115 </fo:block>
116 </xsl:template>
117
118 <xsl:template match="d:subtitle" mode="slides.titlepage.recto.auto.mode">
119 <fo:block xsl:use-attribute-sets="slides.titlepage.subtitle.properties">
120 <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
121 </fo:block>
122 </xsl:template>
123
124 <xsl:template match="d:corpauthor" mode="slides.titlepage.recto.auto.mode">
125 <fo:block xsl:use-attribute-sets="slides.titlepage.corpauthor.properties">
126 <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
127 </fo:block>
128 </xsl:template>
129
130 <xsl:template match="d:authorgroup" mode="slides.titlepage.recto.auto.mode">
131 <fo:block xsl:use-attribute-sets="slides.titlepage.authorgroup.properties">
132 <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
133 </fo:block>
134 </xsl:template>
135
136 <xsl:template match="d:author" mode="slides.titlepage.recto.auto.mode">
137 <fo:block xsl:use-attribute-sets="slides.titlepage.author.properties">
138 <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
139 </fo:block>
140 </xsl:template>
141
142 <xsl:template match="d:pubdate" mode="slides.titlepage.recto.auto.mode">
143 <fo:block xsl:use-attribute-sets="slides.titlepage.pubdate.properties">
144 <xsl:apply-templates select="." mode="slides.titlepage.recto.mode"/>
145 </fo:block>
146 </xsl:template>
147
148 </xsl:stylesheet>