X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/1168ecb421c920b38c07b94152158959fd0ee1b8..1d9833e372425e68597e30e2cb85da17e7d57dc1:/librarian/fb2/poems.xslt

diff --git a/librarian/fb2/poems.xslt b/librarian/fb2/poems.xslt
index 77716e3..31b05b4 100644
--- a/librarian/fb2/poems.xslt
+++ b/librarian/fb2/poems.xslt
@@ -14,50 +14,26 @@
 	<!-- poems -->
 
 	<!-- match poem citations -->
-	<xsl:template mode="paras" match="poezja_cyt">
+	<xsl:template mode="para" match="poezja_cyt">
 		<cite>
 			<poem>
-				<xsl:apply-templates mode="poem"/>
+				<xsl:apply-templates mode="para"/>
 			</poem>
 		</cite>
 	</xsl:template>
-	<!-- / XXX: fb2 doesn't allow <poem/> inside <p/> /
-	<xsl:template mode="inline" match="poezja_cyt">
-
-		<poem>
-			<xsl:apply-templates mode="poem"/>
-		</poem>
-	</xsl:template>
-	-->
 
 	<!-- regular poem elements -->
-	<xsl:template mode="poem" match="strofa">
+	<xsl:template mode="para" match="strofa">
 		<stanza>
-			<xsl:call-template name="split-poem">
-				<xsl:with-param name="list" select="."/>
-			</xsl:call-template>
+			<xsl:apply-templates mode="poem"/>
 		</stanza>
 	</xsl:template>
 
-	<!-- split into verses -->
-	<xsl:template name="split-poem">
-		<xsl:param name="list"></xsl:param>
+	<!-- XXX: it should be done elsewhere but our cheap verse splitting
+		puts it here -->
+	<xsl:template match="motyw" mode="poem"/>
 
-		<xsl:if test="$list != ''">
-			<xsl:variable name="before"
-				select="substring-before(concat($list, '/'), '/')"/>
-			<xsl:variable name="after"
-				select="substring-after($list, '/')"/>
-
-			<v>
-				<xsl:value-of select="$before"/>
-			</v>
-
-			<xsl:call-template name="split-poem">
-				<xsl:with-param name="list" select="$after"/>
-			</xsl:call-template>
-		</xsl:if>
+	<xsl:template mode="poem" match="wers_normalny|wers_cd|wers_wciety|wers_akap">
+		<v><xsl:apply-templates mode="inline"/></v>
 	</xsl:template>
-
-	<xsl:template match="text()" mode="poem"/>
 </xsl:stylesheet>