epub: subtitle fix
[librarian.git] / librarian / epub / xsltTitle.xsl
index e8afdac..347f038 100644 (file)
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
-<xsl:stylesheet version="1.0" \r
+<xsl:stylesheet version="1.0"\r
+    xmlns="http://www.w3.org/1999/xhtml"\r
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
     xmlns:dc="http://purl.org/dc/elements/1.1/"\r
     xmlns:wl="http://wolnelektury.pl/functions">\r
@@ -8,7 +9,7 @@
   <xsl:output doctype-public="-//W3C//DTD XHTML 1.1//EN" />\r
 \r
   <xsl:template match="/">\r
-    <html xmlns="http://www.w3.org/1999/xhtml">\r
+    <html>\r
       <head>\r
         <link rel="stylesheet" href="style.css" type="text/css" />\r
         <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />\r
@@ -17,7 +18,7 @@
         </title>\r
       </head>\r
       <body>\r
-        <div id="book-text" xmlns="http://www.w3.org/1999/xhtml">\r
+        <div id="book-text" >\r
           <div class='title-page'>\r
             <xsl:choose>\r
               <xsl:when test="//autor_utworu | //nazwa_utworu">\r
               </xsl:otherwise>\r
             </xsl:choose>\r
           </div>\r
-          <p class="info">Publikacja zrealizowana w ramach projektu WolneLektury.pl</p>\r
-          <xsl:if test="//dc:source" >\r
-            <p class="info">Na podstawie: <xsl:value-of select="//dc:source" /></p>\r
-          </xsl:if>\r
-          <p class="info">\r
-              <xsl:choose>\r
-                  <xsl:when test="//dc:rights.license">\r
-                      Ten utwór jest udostepniony na licencji\r
-                      <a>\r
-                          <xsl:attribute name="href">\r
-                              <xsl:value-of select="//dc:rights.license" />\r
-                          </xsl:attribute>\r
-                          <xsl:value-of select="//dc:rights" />\r
-                      </a>\r
-                  </xsl:when>\r
-                  <xsl:otherwise>\r
-                      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
-                  </xsl:otherwise>\r
-              </xsl:choose>\r
-          </p>\r
 \r
+          <p class="info">&#160;</p>\r
+\r
+          <xsl:apply-templates select="//dc:contributor.translator" />\r
+\r
+          <!--p class="info">\r
+              <a>\r
+                  <xsl:attribute name="href">\r
+                      <xsl:value-of select="//dc:identifier.url" />\r
+                  </xsl:attribute>\r
+                  Ta lektura</a>,\r
+              podobnie jak tysiące innych, jest dostępna on-line na stronie\r
+              <a href="http://www.wolnelektury.pl/">wolnelektury.pl</a>.\r
+          </p-->\r
 \r
           <p class="info">\r
-            <img src="logo_wolnelektury.png" alt="WolneLektury.pl" />\r
+            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
+          </p>\r
+\r
+          <p class="footer info">\r
+            <a href="http://www.wolnelektury.pl/"><img src="logo_wolnelektury.png" alt="WolneLektury.pl" /></a>\r
           </p>\r
         </div>\r
       </body>\r
   </xsl:template>\r
 \r
   <xsl:template match="dc:creator" mode="poczatek">\r
-    <div class="author" xmlns="http://www.w3.org/1999/xhtml">\r
-      <xsl:apply-templates />\r
-    </div>\r
+    <h2 class="author">\r
+      <xsl:apply-templates mode='person' />\r
+    </h2>\r
   </xsl:template>\r
 \r
   <xsl:template match="dc:creator/text()">\r
-    <div class="author" xmlns="http://www.w3.org/1999/xhtml">\r
-      <xsl:value-of select="wl:person_name(.)" />\r
-    </div>\r
+    <h2 class="author" >\r
+      <xsl:apply-templates mode='person' />\r
+    </h2>\r
+  </xsl:template>\r
+\r
+  <xsl:template match="dc:contributor.translator">\r
+    <p class="info">\r
+      tłum. <xsl:apply-templates mode="person" />\r
+    </p>\r
+  </xsl:template>\r
+\r
+  <xsl:template match="text()" mode="person">\r
+    <xsl:value-of select="wl:person_name(.)" />\r
   </xsl:template>\r
 \r
   <xsl:template match="autor_utworu" mode="poczatek">\r
-    <div class="author" xmlns="http://www.w3.org/1999/xhtml">\r
+    <h2 class="author" >\r
       <xsl:apply-templates />\r
-    </div>\r
+    </h2>\r
   </xsl:template>\r
 \r
   <xsl:template match="dzielo_nadrzedne" mode="poczatek">\r
-    <div class="collection" xmlns="http://www.w3.org/1999/xhtml">\r
+    <h2 class="collection" >\r
       <xsl:apply-templates />\r
-    </div>\r
+    </h2>\r
   </xsl:template>\r
 \r
   <xsl:template match="nazwa_utworu" mode="poczatek" >\r
-    <h1 class="title" xmlns="http://www.w3.org/1999/xhtml">\r
+    <h1 class="title" >\r
       <xsl:apply-templates />\r
     </h1>\r
   </xsl:template>\r
 \r
   <xsl:template match="dc:title" mode="poczatek" >\r
-    <h1 class="title" xmlns="http://www.w3.org/1999/xhtml">\r
+    <h1 class="title" >\r
       <xsl:apply-templates />\r
     </h1>\r
   </xsl:template>\r
 \r
   <xsl:template match="podtytul" mode="poczatek">\r
-    <div class="subtitle" xmlns="http://www.w3.org/1999/xhtml">\r
+    <h2 class="subtitle" >\r
       <xsl:apply-templates />\r
-    </div>\r
+    </h2>\r
   </xsl:template>\r
 \r
   <xsl:template match="pe|pa|pr|pt" />\r
 \r
   <xsl:template match="extra" />\r
 \r
-  <xsl:template match="pe|pa|pr|pt" />\r
-\r
-  <xsl:template match="extra" />\r
-\r
   <xsl:template match="motyw" />\r
 \r
 </xsl:stylesheet>
\ No newline at end of file