Added handling of tags: "mat", "didask_tekst", "slowo_obce", "tytul_dziela", "wyrozni...
[wolnelektury.git] / lib / librarian / book2html.xslt
index f7bb9a2..bd1b8bb 100644 (file)
@@ -78,7 +78,7 @@
     </div>
 </xsl:template>
 
-<xsl:template match="dlugi_cytat">
+<xsl:template match="dlugi_cytat|poezja_cyt">
     <blockquote><xsl:apply-templates /></blockquote>
 </xsl:template>
 
     <span class="subtitle"><xsl:apply-templates mode="inline" /></span>
 </xsl:template>
 
-<!-- Section headers -->
+<!-- Section headers (included in index)-->
 <xsl:template match="naglowek_akt|naglowek_czesc|srodtytul">
     <h2><xsl:apply-templates mode="inline" /></h2>
 </xsl:template>
     <p>
         <xsl:choose>
             <xsl:when test="name($line-content) = 'wers_akap'">
-                <xsl:attribute name="style">indent: 1em</xsl:attribute>
+                <xsl:attribute name="style">padding-left: 1em</xsl:attribute>
             </xsl:when>
             <xsl:when test="name($line-content) = 'wers_wciety'">
-                <xsl:attribute name="style">indent: 2em</xsl:attribute>
+                <xsl:attribute name="style">padding-left: <xsl:value-of select="$line-content/@typ" />em</xsl:attribute>
             </xsl:when>
         </xsl:choose>
         <xsl:apply-templates select="$line-content" mode="inline" />
     <a href="{concat('#footnote-', generate-id(.))}" class="annotation">[<xsl:number value="count(preceding::*[self::pa or self::pe or self::pr or self::pt]) + 1" />]</a>
 </xsl:template>
 
+<!-- Other inline tags -->
+<xsl:template match="mat" mode="inline">
+    <em class="math"><xsl:apply-templates mode="inline" /></em>
+</xsl:template>
+
+<xsl:template match="didask_tekst" mode="inline">
+    <em class="didaskalia"><xsl:apply-templates mode="inline" /></em>
+</xsl:template>
+
+<xsl:template match="slowo_obce" mode="inline">
+    <em class="foreign-word"><xsl:apply-templates mode="inline" /></em>
+</xsl:template>
+
+<xsl:template match="tytul_dziela" mode="inline">
+    <em class="book-title">
+        <xsl:if test="./@typ = '1'">„</xsl:if><xsl:apply-templates mode="inline" /><xsl:if test="./@typ = '1">”</xsl:if>
+    </em>
+</xsl:template>
+
+<xsl:template match="wyroznienie" mode="inline">
+    <em class="author-emphasis"><xsl:apply-templates mode="inline" /></em>
+</xsl:template>
+
+<xsl:template match="osoba" mode="inline">
+    <em class="person"><xsl:apply-templates mode="inline" /></em>
+</xsl:template>
+
 
 <!-- ============================================== -->
 <!-- = STANDALONE TAGS                            = -->