#961: full info in all formats;
[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:call-template name="translators" />\r
38 \r
39           <xsl:if test="not(utwor/@less-advertising)">\r
40             <p class="info">\r
41               <a>\r
42                   <xsl:attribute name="href">\r
43                       <xsl:value-of select="//dc:identifier.url" />\r
44                   </xsl:attribute>\r
45                   Ta lektura</a>,\r
46               podobnie jak tysiące innych, jest dostępna on-line na stronie\r
47               <a href="http://www.wolnelektury.pl/">wolnelektury.pl</a>.\r
48             </p>\r
49           </xsl:if>\r
50 \r
51           <p class="info">\r
52             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
53           </p>\r
54 \r
55           <p class="footer info">\r
56             <a href="http://www.wolnelektury.pl/"><img src="logo_wolnelektury.png" alt="WolneLektury.pl" /></a>\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     <h2 class="author">\r
73       <xsl:apply-templates mode='person' />\r
74     </h2>\r
75   </xsl:template>\r
76 \r
77   <xsl:template match="dc:creator/text()">\r
78     <h2 class="author" >\r
79       <xsl:apply-templates mode='person' />\r
80     </h2>\r
81   </xsl:template>\r
82 \r
83   <xsl:template name="translators">\r
84     <xsl:if test="//dc:contributor.translator">\r
85         <p class="info">\r
86             <xsl:text>tłum. </xsl:text>\r
87             <xsl:for-each select="//dc:contributor.translator">\r
88                 <xsl:if test="position() != 1">, </xsl:if>\r
89                 <xsl:apply-templates mode="person" />\r
90             </xsl:for-each>\r
91         </p>\r
92     </xsl:if>\r
93   </xsl:template>\r
94 \r
95   <xsl:template match="text()" mode="person">\r
96     <xsl:value-of select="wl:person_name(.)" />\r
97   </xsl:template>\r
98 \r
99   <xsl:template match="autor_utworu" mode="poczatek">\r
100     <h2 class="author" >\r
101       <xsl:apply-templates />\r
102     </h2>\r
103   </xsl:template>\r
104 \r
105   <xsl:template match="dzielo_nadrzedne" mode="poczatek">\r
106     <h2 class="collection" >\r
107       <xsl:apply-templates />\r
108     </h2>\r
109   </xsl:template>\r
110 \r
111   <xsl:template match="nazwa_utworu" mode="poczatek" >\r
112     <h1 class="title" >\r
113       <xsl:apply-templates />\r
114     </h1>\r
115   </xsl:template>\r
116 \r
117   <xsl:template match="dc:title" mode="poczatek" >\r
118     <h1 class="title" >\r
119       <xsl:apply-templates />\r
120     </h1>\r
121   </xsl:template>\r
122 \r
123   <xsl:template match="podtytul" mode="poczatek">\r
124     <h2 class="subtitle" >\r
125       <xsl:apply-templates />\r
126     </h2>\r
127   </xsl:template>\r
128 \r
129   <xsl:template match="pe|pa|pr|pt" />\r
130 \r
131   <xsl:template match="extra" />\r
132 \r
133   <xsl:template match="motyw" />\r
134 \r
135 </xsl:stylesheet>