8f5dfea1a4e29832de3c2b72a76a2ff9d8255466
[librarian.git] / librarian / epub / xsltTitle.xsl
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <xsl:stylesheet version="1.0" \r
3     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
4     xmlns:dc="http://purl.org/dc/elements/1.1/"\r
5     xmlns:wl="http://wolnelektury.pl/functions">\r
6   <xsl:output method="html" version="1.0" encoding="utf-8" />\r
7   <xsl:output doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" />\r
8   <xsl:output doctype-public="-//W3C//DTD XHTML 1.1//EN" />\r
9 \r
10   <xsl:template match="/">\r
11     <html xmlns="http://www.w3.org/1999/xhtml">\r
12       <head>\r
13         <link rel="stylesheet" href="style.css" type="text/css" />\r
14         <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />\r
15         <title>\r
16           <xsl:text>Strona tytuĹ‚owa</xsl:text>\r
17         </title>\r
18       </head>\r
19       <body>\r
20         <div id="book-text" xmlns="http://www.w3.org/1999/xhtml">\r
21           <div class='title-page'>\r
22             <xsl:choose>\r
23               <xsl:when test="//autor_utworu | //nazwa_utworu">\r
24                 <xsl:apply-templates select="//autor_utworu" mode="poczatek"/>\r
25                 <xsl:apply-templates select="//nazwa_utworu | //podtytul | //dzielo_nadrzedne" mode="poczatek"/>\r
26               </xsl:when>\r
27               <xsl:otherwise>\r
28                 <xsl:apply-templates select="//dc:creator" mode="poczatek"/>\r
29                 <xsl:apply-templates select="//dc:title | //podtytul | //dzielo_nadrzedne" mode="poczatek"/>\r
30               </xsl:otherwise>\r
31             </xsl:choose>\r
32           </div>\r
33           <p class="info"><xsl:value-of select="//dc:source" /></p>\r
34           <p class="info">Publikacja zrealizowana w ramach projektu WolneLektury.pl</p>\r
35           <p class="info">\r
36             <img src="logo_wolnelektury.png" alt="WolneLektury.pl" />\r
37           </p>\r
38         </div>\r
39       </body>\r
40     </html>\r
41   </xsl:template>\r
42 \r
43   <xsl:template match="text()" >\r
44     <xsl:value-of select="." disable-output-escaping="yes" />\r
45   </xsl:template>\r
46 \r
47   <xsl:template match="node()" mode="poczatek">\r
48     <xsl:value-of select="." />\r
49   </xsl:template>\r
50 \r
51   <xsl:template match="dc:creator" mode="poczatek">\r
52     <div class="author" xmlns="http://www.w3.org/1999/xhtml">\r
53       <xsl:apply-templates />\r
54     </div>\r
55   </xsl:template>\r
56 \r
57   <xsl:template match="dc:creator/text()">\r
58     <div class="author" xmlns="http://www.w3.org/1999/xhtml">\r
59       <xsl:value-of select="wl:person_name(.)" />\r
60     </div>\r
61   </xsl:template>\r
62 \r
63   <xsl:template match="autor_utworu" mode="poczatek">\r
64     <div class="author" xmlns="http://www.w3.org/1999/xhtml">\r
65       <xsl:apply-templates />\r
66     </div>\r
67   </xsl:template>\r
68 \r
69   <xsl:template match="dzielo_nadrzedne" mode="poczatek">\r
70     <div class="collection" xmlns="http://www.w3.org/1999/xhtml">\r
71       <xsl:apply-templates />\r
72     </div>\r
73   </xsl:template>\r
74 \r
75   <xsl:template match="nazwa_utworu" mode="poczatek" >\r
76     <h1 class="title" xmlns="http://www.w3.org/1999/xhtml">\r
77       <xsl:apply-templates />\r
78     </h1>\r
79   </xsl:template>\r
80 \r
81   <xsl:template match="dc:title" mode="poczatek" >\r
82     <h1 class="title" xmlns="http://www.w3.org/1999/xhtml">\r
83       <xsl:apply-templates />\r
84     </h1>\r
85   </xsl:template>\r
86 \r
87   <xsl:template match="podtytul" mode="poczatek">\r
88     <div class="subtitle" xmlns="http://www.w3.org/1999/xhtml">\r
89       <xsl:apply-templates />\r
90     </div>\r
91   </xsl:template>\r
92 \r
93   <xsl:template match="pe|pa|pr|pt" />\r
94 \r
95   <xsl:template match="extra" />\r
96 \r
97   <xsl:template match="pe|pa|pr|pt" />\r
98 \r
99   <xsl:template match="extra" />\r
100 \r
101   <xsl:template match="motyw" />\r
102 \r
103 </xsl:stylesheet>