6cb2748324499d1dc43ed18be4994aab40dac7e0
[librarian.git] / librarian / epub / xsltLast.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     xmlns:date="http://exslt.org/dates-and-times">\r
8   <xsl:output method="html" version="1.0" encoding="utf-8" />\r
9   <xsl:output doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" />\r
10   <xsl:output doctype-public="-//W3C//DTD XHTML 1.1//EN" />\r
11 \r
12   <xsl:template match="/">\r
13     <html>\r
14       <head>\r
15         <link rel="stylesheet" href="style.css" type="text/css" />\r
16         <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />\r
17         <title>\r
18           <xsl:text>Strona redakcyjna</xsl:text>\r
19         </title>\r
20       </head>\r
21       <body>\r
22         <div id="book-text" >\r
23           <p class="info">\r
24               <xsl:choose>\r
25                   <xsl:when test="//dc:rights.license">\r
26                       Ten utwór jest udostepniony na licencji\r
27                       <a>\r
28                           <xsl:attribute name="href">\r
29                               <xsl:value-of select="//dc:rights.license" />\r
30                           </xsl:attribute>\r
31                           <xsl:value-of select="//dc:rights" />\r
32                       </a>\r
33                   </xsl:when>\r
34                   <xsl:otherwise>\r
35                     Ten utwór nie jest chroniony prawem autorskim i znajduje się w domenie\r
36                     publicznej, co oznacza, że możesz go swobodnie wykorzystywać, publikować\r
37                     i rozpowszechniać. Jeśli utwór opatrzony jest dodatkowymi materiałami\r
38                     (przypisy, motywy literackie etc.) które podlegają prawu autorskiemu, to\r
39                     te dodatkowe materiały udostępnione są na licencji\r
40                     <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons\r
41                     Uznanie Autorstwa - Na Tych Samych Warunkach 3.0 PL</a>.\r
42                   </xsl:otherwise>\r
43               </xsl:choose>\r
44           </p>\r
45 \r
46           <p class="info">Źródło: <a>\r
47               <xsl:attribute name="href">\r
48                   <xsl:value-of select="//dc:identifier.url" />\r
49               </xsl:attribute>\r
50               <xsl:attribute name="title">\r
51                   <xsl:value-of select="wl:person_name(//dc:creator/text())" />, <xsl:value-of select="//dc:title" />\r
52               </xsl:attribute>\r
53               <xsl:value-of select="//dc:identifier.url" />\r
54           </a></p>\r
55 \r
56           <xsl:if test="//dc:source" >\r
57             <p class="info">Na podstawie: <xsl:value-of select="//dc:source" /></p>\r
58           </xsl:if>\r
59 \r
60           <xsl:if test="//dc:contributor.editor|//dc:contributor.technical_editor">\r
61               <p class="info">\r
62                 Opracowanie redakcyjne i przypisy:\r
63                 <xsl:apply-templates select="//dc:contributor.editor|//dc:contributor.technical_editor" />\r
64               </p>\r
65           </xsl:if>\r
66 \r
67           <p class="info">&#160;</p>\r
68           <p class="minor info">\r
69               Plik wygenerowany dnia <span id="file_date"><xsl:value-of select="substring(date:date(), 1, 10)" /></span>.\r
70           </p>\r
71 \r
72         </div>\r
73       </body>\r
74     </html>\r
75   </xsl:template>\r
76 \r
77   <xsl:template match="text()" >\r
78     <xsl:value-of select="." disable-output-escaping="yes" />\r
79   </xsl:template>\r
80 \r
81   <xsl:template match="dc:contributor.editor|dc:contributor.technical_editor">\r
82       <br /><xsl:apply-templates mode='person' />\r
83   </xsl:template>\r
84 \r
85   <xsl:template match="text()" mode="person">\r
86     <xsl:value-of select="wl:person_name(.)" />\r
87   </xsl:template>\r
88 </xsl:stylesheet>