if not text:
return
for i, verse_text in enumerate(re.split(r"/\s*\n", text)):
+ if not verse_text.strip():
+ continue
if i:
self.open_normal_verse()
verse = self.get_open_verse()
table {
border-collapse: collapse;
+ width: 100%;
}
-td {
+table.border th, table.border td {
border: 1px solid black;
}
</div>
</xsl:template>
- <xsl:template match="ilustr" mode="inline">
- <xsl:apply-templates select="." />
- </xsl:template>
-
<xsl:template match="ilustr">
<img>
<xsl:attribute name="src">
</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">
</stanza>
</xsl:template>
+ <xsl:template mode="inline" match="strofa">
+ <xsl:apply-templates select="." mode="para"/>
+ </xsl:template>
+
<!-- XXX: it should be done elsewhere but our cheap verse splitting
puts it here -->
<xsl:template match="motyw" mode="poem"/>
</cmd>
</xsl:template>
+<xsl:template match="strofa" mode="inline">
+ <env name="minipage">
+ <parm><cmd name="linewidth" /></parm>
+ <parm><xsl:apply-templates select="." /></parm>
+ </env>
+</xsl:template>
+
<xsl:template match="strofa">
<cmd name="strofa"><parm>
<xsl:choose>
</p>
</xsl:template>
+<xsl:template match="strofa" mode="inline">
+ <xsl:apply-templates select="." />
+</xsl:template>
+
<xsl:template match="strofa">
<div class="stanza">
<xsl:call-template name="section-anchor"/>
</xsl:template>
<xsl:template match="tabela|tabelka">
- <table><xsl:apply-templates /></table>
+ <xsl:choose>
+ <xsl:when test="@ramka = '1'">
+ <table class="border"><xsl:apply-templates /></table>
+ </xsl:when>
+ <xsl:otherwise>
+ <table><xsl:apply-templates /></table>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template match="wiersz">
<tr><xsl:apply-templates /></tr>