hack to prevent self-closing <a> tags
[librarian.git] / librarian / epub / xsltScheme.xsl
index c9c6a75..e67cda7 100644 (file)
     </div>
   </xsl:template>
 
-  <xsl:template match="motto">
-    <div class="motto" xmlns="http://www.w3.org/1999/xhtml">
+  <xsl:template match="ramka">
+    <div class="frame" xmlns="http://www.w3.org/1999/xhtml">
       <xsl:apply-templates />
     </div>
   </xsl:template>
 
-  <xsl:template match="ilustr" mode="inline">
-    <xsl:apply-templates select="." />
+  <xsl:template match="motto">
+    <div class="motto" xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:apply-templates />
+    </div>
   </xsl:template>
 
   <xsl:template match="ilustr">
   </xsl:template>
 
   <xsl:template match="naglowek_scena">
-    <a id="sub{@sub}" xmlns="http://www.w3.org/1999/xhtml"></a>
+    <a id="sub{@sub}" xmlns="http://www.w3.org/1999/xhtml"><xsl:comment/><!-- hack to keep closing tags --></a>
     <h2 class="h3" xmlns="http://www.w3.org/1999/xhtml">
       <xsl:apply-templates />
     </h2>
   </xsl:template>
 
   <xsl:template match="naglowek_podrozdzial">
-    <a id="sub{@sub}" xmlns="http://www.w3.org/1999/xhtml"></a>
+    <a id="sub{@sub}" xmlns="http://www.w3.org/1999/xhtml"><xsl:comment/><!-- same as above --></a>
     <h2 class="h4" xmlns="http://www.w3.org/1999/xhtml">
       <xsl:apply-templates />
     </h2>
     &#160;</div>
   </xsl:template>
 
+  <xsl:template match="wers_do_prawej">
+    <div class="verse" style='text-align: right;' xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:apply-templates/>
+    &#160;</div>
+  </xsl:template>
+
   <xsl:template match="wers_wciety[@typ!='']">
     <div class="verse" xmlns="http://www.w3.org/1999/xhtml">
       <xsl:attribute name="style">
     </em>
   </xsl:template>
 
+  <xsl:template match="wieksze_odstepy" >
+    <em class="wieksze-odstepy" xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:apply-templates />
+    </em>
+  </xsl:template>
+
+  <xsl:template match="indeks_dolny" >
+    <sub xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:apply-templates />
+    </sub>
+  </xsl:template>
+
   <xsl:template match="osoba" >
     <em class="person" xmlns="http://www.w3.org/1999/xhtml">
       <xsl:apply-templates />
 </xsl:template>
 
 <xsl:template match="tabela|tabelka">
-  <table xmlns="http://www.w3.org/1999/xhtml">
-    <xsl:apply-templates />
-  </table>
+    <xsl:choose>
+        <xsl:when test="@ramka = '1'">
+            <table class="border" xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates /></table>
+        </xsl:when>
+        <xsl:otherwise>
+            <table xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates /></table>
+        </xsl:otherwise>
+    </xsl:choose>
 </xsl:template>
 <xsl:template match="wiersz">
   <tr xmlns="http://www.w3.org/1999/xhtml">