def transform_file(input_xml, chunk_counter=1, first=True):
""" processes one input file and proceeds to its children """
+ replace_characters(input_xml.getroot())
+
children = [child.text for child in input_xml.findall('.//'+DCNS('relation.hasPart'))]
# every input file will have a TOC entry,
main_text = None
if main_text is not None:
- replace_characters(main_text)
-
for chunk_xml in chop(main_text):
chunk_html, chunk_toc, chunk_chars = transform_chunk(chunk_xml, chunk_counter, annotations)
toc.extend(chunk_toc)
</xsl:template>\r
\r
<xsl:template match="wers_akap">\r
- <div class="verse" style="padding-left: 1em;" xmlns="http://www.w3.org/1999/xhtml">\r
+ <div class="verse" style="margin-left: 1em;" xmlns="http://www.w3.org/1999/xhtml">\r
<xsl:apply-templates />\r
</div>\r
</xsl:template>\r
\r
<xsl:template match="wers_wciety">\r
- <div class="verse" style="padding-left: 1em;" xmlns="http://www.w3.org/1999/xhtml">\r
+ <div class="verse" style='margin-left:1em;' xmlns="http://www.w3.org/1999/xhtml">\r
<xsl:apply-templates />\r
</div>\r
</xsl:template>\r
\r
- <xsl:template match="wers_wciety[@typ='1']">\r
- <div class="verse" style="padding-left: 1em;" xmlns="http://www.w3.org/1999/xhtml">\r
- <xsl:apply-templates />\r
- </div>\r
- </xsl:template>\r
-\r
- <xsl:template match="wers_wciety[@typ='2']">\r
- <div class="verse" style="padding-left: 2em;" xmlns="http://www.w3.org/1999/xhtml">\r
- <xsl:apply-templates />\r
- </div>\r
- </xsl:template>\r
-\r
- <xsl:template match="wers_wciety[@typ='3']">\r
- <div class="verse" style="padding-left: 3em;" xmlns="http://www.w3.org/1999/xhtml">\r
- <xsl:apply-templates />\r
- </div>\r
- </xsl:template>\r
-\r
- <xsl:template match="wers_wciety[@typ='4']">\r
- <div class="verse" style="padding-left: 4em;" xmlns="http://www.w3.org/1999/xhtml">\r
- <xsl:apply-templates />\r
- </div>\r
- </xsl:template>\r
-\r
- <xsl:template match="wers_wciety[@typ='5']">\r
- <div class="verse" style="padding-left: 5em;" xmlns="http://www.w3.org/1999/xhtml">\r
- <xsl:apply-templates />\r
- </div>\r
- </xsl:template>\r
-\r
- <xsl:template match="wers_wciety[@typ='6']">\r
- <div class="verse" style="padding-left: 6em;" xmlns="http://www.w3.org/1999/xhtml">\r
+ <xsl:template match="wers_wciety[@typ!='']">\r
+ <div class="verse" xmlns="http://www.w3.org/1999/xhtml">\r
+ <xsl:attribute name="style">\r
+ margin-left: <xsl:value-of select="@typ" />em;\r
+ </xsl:attribute>\r
<xsl:apply-templates />\r
</div>\r
</xsl:template>\r
\r
<xsl:template match="wers_cd">\r
- <div class="verse" style="padding-left: 12em;" xmlns="http://www.w3.org/1999/xhtml">\r
+ <div class="verse" style="margin-left: 12em;" xmlns="http://www.w3.org/1999/xhtml">\r
<xsl:apply-templates />\r
</div>\r
</xsl:template>\r