remove anchors from fragments
[librarian.git] / librarian / xslt / book2html.xslt
index 0f9b665..8e1a574 100755 (executable)
@@ -6,7 +6,8 @@
 
 -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:wl="http://wolnelektury.pl/functions" >
+    xmlns:wl="http://wolnelektury.pl/functions"
+    xmlns:dc="http://purl.org/dc/elements/1.1/" >
 
 <xsl:output encoding="utf-8" indent="yes" omit-xml-declaration = "yes" version="2.0" />
 <xsl:template match="utwor">
                 }
 
 
-                #toc, #themes, #nota_red {
+                #toc, #themes, #nota_red, #info {
                     position: fixed;
                     left: 0em;
                     top: 1.5em;
                     position: inherit;
                 }
 
+                #info p {
+                    text-align: justify;
+                    margin: 1.5em 0 0;
+                }
+
                 /* =================================================== */
                 /* = Common elements: headings, paragraphs and lines = */
                 /* =================================================== */
                     margin-top: -0.25em;
                 }
 
+                span.translator {
+                    font-size: 0.375em;
+                    display: block;
+                    line-height: 1.5em;
+                    margin-top: 0.25em;
+                }
+
                 div.didaskalia {
                     font-style: italic;
                     margin: 0.5em 0 0 1.5em;
                         <a href="{concat('#anchor-', generate-id(.))}" class="annotation">[<xsl:number value="count(preceding::*[self::pa or self::pe or self::pr or self::pt]) + 1" />]</a>
                         <xsl:choose>
                             <xsl:when test="count(akap|akap_cd|strofa) = 0">
-                                <p><xsl:apply-templates select="text()|*" mode="inline" /></p>
+                                <p><xsl:apply-templates select="text()|*" mode="inline" />
+                                <xsl:if test="name()='pa'"> [przypis autorski]</xsl:if>
+                                </p>
                             </xsl:when>
                             <xsl:otherwise>
                                 <xsl:apply-templates select="text()|*" mode="inline" />
     <xsl:if test="nazwa_utworu">
         <h1>
             <xsl:apply-templates select="autor_utworu|dzielo_nadrzedne|nazwa_utworu|podtytul" mode="header" />
+            <xsl:call-template name="translators" />
         </h1>
     </xsl:if>
     <xsl:apply-templates />
 </xsl:template>
 
 
+<xsl:template name="translators">
+    <xsl:if test="//dc:contributor.translator">
+        <span class="translator">
+            <xsl:text>tłum. </xsl:text>
+            <xsl:for-each select="//dc:contributor.translator">
+                <xsl:if test="position() != 1">, </xsl:if>
+                <xsl:apply-templates mode="person" />
+            </xsl:for-each>
+        </span>
+    </xsl:if>
+</xsl:template>
+
+<xsl:template match="text()" mode="person">
+    <xsl:value-of select="wl:person_name(.)" />
+</xsl:template>
+
+
 <!-- ================ -->
 <!-- = IGNORED TAGS = -->
 <!-- ================ -->