</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/>
+  </div>
+ </xsl:template>
+
<xsl:template match="wers_wciety[@typ!='']">
<div class="verse" xmlns="http://www.w3.org/1999/xhtml">
<xsl:attribute name="style">
\newcommand{\werswciety}[2][1em]{%
\Nw\hspace*{#1}#2%
}
+\newcommand{\wersdoprawej}[1]{%
+\Nw\hspace*{\fill}#1%
+}
\ifshowfootnotes
\newcommand{\pa}[1]{\NoCaseChange{\footnote{#1 [przypis autorski]}}}
<xsl:when test="count(br) > 0">
<xsl:call-template name="verse">
<xsl:with-param name="verse-content" select="br[1]/preceding-sibling::text() | br[1]/preceding-sibling::node()" />
- <xsl:with-param name="verse-type" select="br[1]/preceding-sibling::*[name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd'][1]" />
+ <xsl:with-param name="verse-type" select="br[1]/preceding-sibling::*[name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd' or name() = 'wers_do_prawej'][1]" />
</xsl:call-template>
<xsl:for-each select="br">
<TeXML escape="0">\\{}</TeXML>
<xsl:call-template name="verse">
<xsl:with-param name="verse-content"
select="following-sibling::text()[count(preceding-sibling::br) = $lnum+1] | following-sibling::node()[count(preceding-sibling::br) = $lnum+1]" />
- <xsl:with-param name="verse-type" select="following-sibling::*[count(preceding-sibling::br) = $lnum+1 and (name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd')][1]" />
+ <xsl:with-param name="verse-type" select="following-sibling::*[count(preceding-sibling::br) = $lnum+1 and (name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd' or name() = 'wers_do_prawej')][1]" />
</xsl:call-template>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="verse">
<xsl:with-param name="verse-content" select="text() | node()" />
- <xsl:with-param name="verse-type" select="wers_wciety|wers_akap|wers_cd[1]" />
+ <xsl:with-param name="verse-type" select="wers_wciety|wers_akap|wers_cd|wers_do_prawej[1]" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:when test="count(br) > 0">
<xsl:call-template name="verse">
<xsl:with-param name="verse-content" select="br[1]/preceding-sibling::text() | br[1]/preceding-sibling::node()" />
- <xsl:with-param name="verse-type" select="br[1]/preceding-sibling::*[name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd'][1]" />
+ <xsl:with-param name="verse-type" select="br[1]/preceding-sibling::*[name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd' or name() = 'wers_do_prawej'][1]" />
</xsl:call-template>
<xsl:for-each select="br">
<!-- Each BR tag "consumes" text after it -->
<xsl:call-template name="verse">
<xsl:with-param name="verse-content"
select="following-sibling::text()[count(preceding-sibling::br) = $lnum+1] | following-sibling::node()[count(preceding-sibling::br) = $lnum+1]" />
- <xsl:with-param name="verse-type" select="following-sibling::*[count(preceding-sibling::br) = $lnum+1 and (name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd')][1]" />
+ <xsl:with-param name="verse-type" select="following-sibling::*[count(preceding-sibling::br) = $lnum+1 and (name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd' or name() = 'wers_do_prawej')][1]" />
</xsl:call-template>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="verse">
<xsl:with-param name="verse-content" select="text() | node()" />
- <xsl:with-param name="verse-type" select="wers_wciety|wers_akap|wers_cd[1]" />
+ <xsl:with-param name="verse-type" select="wers_wciety|wers_akap|wers_cd|wers_do_prawej[1]" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:when test="name($verse-type) = 'wers_cd'">
<xsl:attribute name="style">padding-left: 12em</xsl:attribute>
</xsl:when>
+ <xsl:when test="name($verse-type) = 'wers_do_prawej'">
+ <xsl:attribute name="style">text-align: right</xsl:attribute>
+ </xsl:when>
</xsl:choose>
<xsl:apply-templates select="$verse-content" mode="inline" />
</p>
<xsl:when test="count(br) > 0">
<xsl:call-template name="verse">
<xsl:with-param name="verse-content" select="br[1]/preceding-sibling::text() | br[1]/preceding-sibling::node()" />
- <xsl:with-param name="verse-type" select="br[1]/preceding-sibling::*[name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd'][1]" />
+ <xsl:with-param name="verse-type" select="br[1]/preceding-sibling::*[name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd' or name() = 'wers_do_prawej'][1]" />
</xsl:call-template>
<xsl:for-each select="br">
<!-- Each BR tag "consumes" text after it -->
<xsl:call-template name="verse">
<xsl:with-param name="verse-content"
select="following-sibling::text()[count(preceding-sibling::br) = $lnum+1] | following-sibling::node()[count(preceding-sibling::br) = $lnum+1]" />
- <xsl:with-param name="verse-type" select="following-sibling::*[count(preceding-sibling::br) = $lnum+1 and (name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd')][1]" />
+ <xsl:with-param name="verse-type" select="following-sibling::*[count(preceding-sibling::br) = $lnum+1 and (name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd' or name() = 'wers_do_prawej')][1]" />
</xsl:call-template>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="verse">
<xsl:with-param name="verse-content" select="text() | node()" />
- <xsl:with-param name="verse-type" select="wers_wciety|wers_akap|wers_cd[1]" />
+ <xsl:with-param name="verse-type" select="wers_wciety|wers_akap|wers_cd|wers_do_prawej[1]" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:when test="name($verse-type) = 'wers_cd'">
<xsl:text> </xsl:text>
</xsl:when>
+ <xsl:when test="name($verse-type) = 'wers_do_prawej'">
+ <xsl:text> </xsl:text>
+ </xsl:when>
</xsl:choose>
<xsl:value-of select="wl:strip($content)" />
</xsl:template>
<wers_cd />
<wers_akap />
<wers_wciety />
+ <wers_do_prawej />
</paragraph-elements>
<header-1-elements element="h1" mixed="true">
<!-- First, collect all the tags up to first BR -->
<xsl:call-template name="verse">
<xsl:with-param name="verse-content" select="br[1]/preceding-sibling::node()" />
- <xsl:with-param name="verse-type" select="br[1]/preceding-sibling::*[name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd'][1]" />
+ <xsl:with-param name="verse-type" select="br[1]/preceding-sibling::*[name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd' or name() = 'wers_do_prawej'][1]" />
</xsl:call-template>
<!-- Collect the rest of verses -->
<xsl:call-template name="verse">
<xsl:with-param name="verse-content"
select="following-sibling::node()[count(preceding-sibling::br) = $lnum+1 and name() != 'br']" />
- <xsl:with-param name="verse-type" select="following-sibling::*[count(preceding-sibling::br) = $lnum+1 and (name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd')][1]" />
+ <xsl:with-param name="verse-type" select="following-sibling::*[count(preceding-sibling::br) = $lnum+1 and (name() = 'wers_wciety' or name() = 'wers_akap' or name() = 'wers_cd' or name() = 'wers_do_prawej')][1]" />
</xsl:call-template>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="verse">
<xsl:with-param name="verse-content" select="child::node()" />
- <xsl:with-param name="verse-type" select="wers_wciety|wers_akap|wers_cd[1]" />
+ <xsl:with-param name="verse-type" select="wers_wciety|wers_akap|wers_cd|wers_do_prawej[1]" />
</xsl:call-template>
</xsl:otherwise>
<wers_wciety typ="4">wers_wciety@typ=4</wers_wciety>/
<wers_wciety typ="5">wers_wciety@typ=5</wers_wciety>/
<wers_wciety typ="6">wers_wciety@typ=6</wers_wciety>/
+<wers_do_prawej>wers do prawej</wers_do_prawej>/
<wers_cd>wers_cd</wers_cd>/
<zastepnik_wersu />. . . . . . . . . . . . . . . .
</strofa>