[HTML] fixes #3029: <motto> contains blocks.
[librarian.git] / librarian / epub / xsltContent.xsl
index 6752be3..c211448 100644 (file)
@@ -1,13 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wl="http://wolnelektury.pl/functions">
   <xsl:output method="html" version="1.0" omit-xml-declaration="no" />
 
   <xsl:template match="/">
     <package xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId" version="2.0">
       <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:opf="http://www.idpf.org/2007/opf">
         <xsl:apply-templates select="//dc:title" />
   <xsl:output method="html" version="1.0" omit-xml-declaration="no" />
 
   <xsl:template match="/">
     <package xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId" version="2.0">
       <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:opf="http://www.idpf.org/2007/opf">
         <xsl:apply-templates select="//dc:title" />
-        <dc:language xsi:type="dcterms:RFC3066">
-          <xsl:apply-templates select="//dc:language" />
+        <dc:language>
+          <xsl:apply-templates select="//dc:language" mode="language" />
         </dc:language>
         <dc:identifier id="BookId" opf:scheme="URI">
           <xsl:apply-templates select="//dc:identifier.url" />
         </dc:language>
         <dc:identifier id="BookId" opf:scheme="URI">
           <xsl:apply-templates select="//dc:identifier.url" />
         <dc:subject>
           <xsl:apply-templates select="//dc:identifier.url" />
         </dc:subject>
         <dc:subject>
           <xsl:apply-templates select="//dc:identifier.url" />
         </dc:subject>
-        <dc:creator>
-          <xsl:apply-templates select="//dc:creator" />
+        <dc:creator opf:role="aut">
+               <xsl:attribute name="opf:file-as">
+               <xsl:value-of select="//dc:creator" />
+            </xsl:attribute>
+            <xsl:apply-templates select="//dc:creator" mode="person" />
         </dc:creator>
         <dc:publisher>
           <xsl:apply-templates select="//dc:publisher" />
         </dc:publisher>
         </dc:creator>
         <dc:publisher>
           <xsl:apply-templates select="//dc:publisher" />
         </dc:publisher>
-        <dc:date xsi:type="dcterms:W3CDTF">
+        <dc:date opf:event="publication">
           <xsl:apply-templates select="//dc:date" />
         </dc:date>
       </metadata>
           <xsl:apply-templates select="//dc:date" />
         </dc:date>
       </metadata>
         <item id="titlePage" href="title.html" media-type="application/xhtml+xml" />
         <item id="logo_wolnelektury" href="logo_wolnelektury.png" media-type="image/png" />
         <item id="jedenprocent" href="jedenprocent.png" media-type="image/png" />
         <item id="titlePage" href="title.html" media-type="application/xhtml+xml" />
         <item id="logo_wolnelektury" href="logo_wolnelektury.png" media-type="image/png" />
         <item id="jedenprocent" href="jedenprocent.png" media-type="image/png" />
-        <item id="DejaVuSerif.ttf" href="DejaVuSerif.ttf" media-type="font/ttf" />
-        <item id="DejaVuSerif-Bold.ttf" href="DejaVuSerif-Bold.ttf" media-type="font/ttf" />
-        <item id="DejaVuSerif-BoldItalic.ttf" href="DejaVuSerif-BoldItalic.ttf" media-type="font/ttf" />
-        <item id="DejaVuSerif-Italic.ttf" href="DejaVuSerif-Italic.ttf" media-type="font/ttf" />
       </manifest>
       <spine toc="toc">
         <itemref idref="titlePage" />
       </spine>
       </manifest>
       <spine toc="toc">
         <itemref idref="titlePage" />
       </spine>
+      <guide>
+        <reference type="text" title="PoczÄ…tek" href="part1.html" />
+      </guide>
     </package>
   </xsl:template>
 
     </package>
   </xsl:template>
 
       <xsl:value-of select="." />
     </dc:title>
   </xsl:template>
       <xsl:value-of select="." />
     </dc:title>
   </xsl:template>
+  
+  <xsl:template match="text()" mode="person">
+    <xsl:value-of select="wl:person_name(.)" />
+  </xsl:template>
+  
+  <xsl:template match="text()" mode="language">
+    <xsl:value-of select="wl:lang_code_3to2(.)" />
+  </xsl:template>
 
 </xsl:stylesheet>
 
 </xsl:stylesheet>