epub: subtitle fix
[librarian.git] / librarian / epub / xsltTitle.xsl
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <xsl:stylesheet version="1.0"\r
3     xmlns="http://www.w3.org/1999/xhtml"\r
4     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
5     xmlns:dc="http://purl.org/dc/elements/1.1/"\r
6     xmlns:wl="http://wolnelektury.pl/functions">\r
7   <xsl:output method="html" version="1.0" encoding="utf-8" />\r
8   <xsl:output doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" />\r
9   <xsl:output doctype-public="-//W3C//DTD XHTML 1.1//EN" />\r
10 \r
11   <xsl:template match="/">\r
12     <html>\r
13       <head>\r
14         <link rel="stylesheet" href="style.css" type="text/css" />\r
15         <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />\r
16         <title>\r
17           <xsl:text>Strona tytułowa</xsl:text>\r
18         </title>\r
19       </head>\r
20       <body>\r
21         <div id="book-text" >\r
22           <div class='title-page'>\r
23             <xsl:choose>\r
24               <xsl:when test="//autor_utworu | //nazwa_utworu">\r
25                 <xsl:apply-templates select="//autor_utworu" mode="poczatek"/>\r
26                 <xsl:apply-templates select="//nazwa_utworu | //podtytul | //dzielo_nadrzedne" mode="poczatek"/>\r
27               </xsl:when>\r
28               <xsl:otherwise>\r
29                 <xsl:apply-templates select="//dc:creator" mode="poczatek"/>\r
30                 <xsl:apply-templates select="//dc:title | //podtytul | //dzielo_nadrzedne" mode="poczatek"/>\r
31               </xsl:otherwise>\r
32             </xsl:choose>\r
33           </div>\r
34 \r
35           <p class="info">&#160;</p>\r
36 \r
37           <xsl:apply-templates select="//dc:contributor.translator" />\r
38 \r
39           <!--p class="info">\r
40               <a>\r
41                   <xsl:attribute name="href">\r
42                       <xsl:value-of select="//dc:identifier.url" />\r
43                   </xsl:attribute>\r
44                   Ta lektura</a>,\r
45               podobnie jak tysiące innych, jest dostępna on-line na stronie\r
46               <a href="http://www.wolnelektury.pl/">wolnelektury.pl</a>.\r
47           </p-->\r
48 \r
49           <p class="info">\r
50             Utwór opracowany został w&#160;ramach projektu<a href="http://www.wolnelektury.pl/"> Wolne Lektury</a> przez<a href="http://www.nowoczesnapolska.org.pl/"> Fundację Nowoczesna Polska</a>.\r
51           </p>\r
52 \r
53           <p class="footer info">\r
54             <a href="http://www.wolnelektury.pl/"><img src="logo_wolnelektury.png" alt="WolneLektury.pl" /></a>\r
55           </p>\r
56         </div>\r
57       </body>\r
58     </html>\r
59   </xsl:template>\r
60 \r
61   <xsl:template match="text()" >\r
62     <xsl:value-of select="." disable-output-escaping="yes" />\r
63   </xsl:template>\r
64 \r
65   <xsl:template match="node()" mode="poczatek">\r
66     <xsl:value-of select="." />\r
67   </xsl:template>\r
68 \r
69   <xsl:template match="dc:creator" mode="poczatek">\r
70     <h2 class="author">\r
71       <xsl:apply-templates mode='person' />\r
72     </h2>\r
73   </xsl:template>\r
74 \r
75   <xsl:template match="dc:creator/text()">\r
76     <h2 class="author" >\r
77       <xsl:apply-templates mode='person' />\r
78     </h2>\r
79   </xsl:template>\r
80 \r
81   <xsl:template match="dc:contributor.translator">\r
82     <p class="info">\r
83       tłum. <xsl:apply-templates mode="person" />\r
84     </p>\r
85   </xsl:template>\r
86 \r
87   <xsl:template match="text()" mode="person">\r
88     <xsl:value-of select="wl:person_name(.)" />\r
89   </xsl:template>\r
90 \r
91   <xsl:template match="autor_utworu" mode="poczatek">\r
92     <h2 class="author" >\r
93       <xsl:apply-templates />\r
94     </h2>\r
95   </xsl:template>\r
96 \r
97   <xsl:template match="dzielo_nadrzedne" mode="poczatek">\r
98     <h2 class="collection" >\r
99       <xsl:apply-templates />\r
100     </h2>\r
101   </xsl:template>\r
102 \r
103   <xsl:template match="nazwa_utworu" mode="poczatek" >\r
104     <h1 class="title" >\r
105       <xsl:apply-templates />\r
106     </h1>\r
107   </xsl:template>\r
108 \r
109   <xsl:template match="dc:title" mode="poczatek" >\r
110     <h1 class="title" >\r
111       <xsl:apply-templates />\r
112     </h1>\r
113   </xsl:template>\r
114 \r
115   <xsl:template match="podtytul" mode="poczatek">\r
116     <h2 class="subtitle" >\r
117       <xsl:apply-templates />\r
118     </h2>\r
119   </xsl:template>\r
120 \r
121   <xsl:template match="pe|pa|pr|pt" />\r
122 \r
123   <xsl:template match="extra" />\r
124 \r
125   <xsl:template match="motyw" />\r
126 \r
127 </xsl:stylesheet>