e8afdacfc9000fec47373b59694752147014e095
[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">Publikacja zrealizowana w ramach projektu WolneLektury.pl</p>\r
34           <xsl:if test="//dc:source" >\r
35             <p class="info">Na podstawie: <xsl:value-of select="//dc:source" /></p>\r
36           </xsl:if>\r
37           <p class="info">\r
38               <xsl:choose>\r
39                   <xsl:when test="//dc:rights.license">\r
40                       Ten utwór jest udostepniony na licencji\r
41                       <a>\r
42                           <xsl:attribute name="href">\r
43                               <xsl:value-of select="//dc:rights.license" />\r
44                           </xsl:attribute>\r
45                           <xsl:value-of select="//dc:rights" />\r
46                       </a>\r
47                   </xsl:when>\r
48                   <xsl:otherwise>\r
49                       Ten utwór nie jest chroniony prawem autorskim i znajduje się w domenie publicznej, co oznacza, że możesz go swobodnie wykorzystywać, publikować i rozpowszechniać\r
50                   </xsl:otherwise>\r
51               </xsl:choose>\r
52           </p>\r
53 \r
54 \r
55           <p class="info">\r
56             <img src="logo_wolnelektury.png" alt="WolneLektury.pl" />\r
57           </p>\r
58         </div>\r
59       </body>\r
60     </html>\r
61   </xsl:template>\r
62 \r
63   <xsl:template match="text()" >\r
64     <xsl:value-of select="." disable-output-escaping="yes" />\r
65   </xsl:template>\r
66 \r
67   <xsl:template match="node()" mode="poczatek">\r
68     <xsl:value-of select="." />\r
69   </xsl:template>\r
70 \r
71   <xsl:template match="dc:creator" mode="poczatek">\r
72     <div class="author" xmlns="http://www.w3.org/1999/xhtml">\r
73       <xsl:apply-templates />\r
74     </div>\r
75   </xsl:template>\r
76 \r
77   <xsl:template match="dc:creator/text()">\r
78     <div class="author" xmlns="http://www.w3.org/1999/xhtml">\r
79       <xsl:value-of select="wl:person_name(.)" />\r
80     </div>\r
81   </xsl:template>\r
82 \r
83   <xsl:template match="autor_utworu" mode="poczatek">\r
84     <div class="author" xmlns="http://www.w3.org/1999/xhtml">\r
85       <xsl:apply-templates />\r
86     </div>\r
87   </xsl:template>\r
88 \r
89   <xsl:template match="dzielo_nadrzedne" mode="poczatek">\r
90     <div class="collection" xmlns="http://www.w3.org/1999/xhtml">\r
91       <xsl:apply-templates />\r
92     </div>\r
93   </xsl:template>\r
94 \r
95   <xsl:template match="nazwa_utworu" mode="poczatek" >\r
96     <h1 class="title" xmlns="http://www.w3.org/1999/xhtml">\r
97       <xsl:apply-templates />\r
98     </h1>\r
99   </xsl:template>\r
100 \r
101   <xsl:template match="dc:title" mode="poczatek" >\r
102     <h1 class="title" xmlns="http://www.w3.org/1999/xhtml">\r
103       <xsl:apply-templates />\r
104     </h1>\r
105   </xsl:template>\r
106 \r
107   <xsl:template match="podtytul" mode="poczatek">\r
108     <div class="subtitle" xmlns="http://www.w3.org/1999/xhtml">\r
109       <xsl:apply-templates />\r
110     </div>\r
111   </xsl:template>\r
112 \r
113   <xsl:template match="pe|pa|pr|pt" />\r
114 \r
115   <xsl:template match="extra" />\r
116 \r
117   <xsl:template match="pe|pa|pr|pt" />\r
118 \r
119   <xsl:template match="extra" />\r
120 \r
121   <xsl:template match="motyw" />\r
122 \r
123 </xsl:stylesheet>