<xsl:template match="powiesc|opowiadanie" mode="outer">
<body> <!-- main body for main book flow -->
<xsl:if test="autor_utworu or nazwa_utworu">
<title>
<xsl:apply-templates mode="title"
<xsl:template match="powiesc|opowiadanie" mode="outer">
<body> <!-- main body for main book flow -->
<xsl:if test="autor_utworu or nazwa_utworu">
<title>
<xsl:apply-templates mode="title"
- <xsl:apply-templates mode="para"
- select="*[count(following-sibling::naglowek_rozdzial)
- = $sections]"/>
+ <xsl:choose>
+ <xsl:when test="local-name() = 'liryka_l'">
+ <poem>
+ <xsl:apply-templates mode="poem"/>
+ </poem>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:apply-templates mode="para"
+ select="*[count(following-sibling::naglowek_rozdzial)
+ = $sections]"/>
+ </xsl:otherwise>
+ </xsl:choose>