1 <?xml version="1.0" encoding="utf-8"?>
4 This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
5 Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
8 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9 xmlns:wl="http://wolnelektury.pl/functions"
10 xmlns:dc="http://purl.org/dc/elements/1.1/"
11 xmlns="http://www.gribuser.ru/xml/fictionbook/2.0"
12 xmlns:l="http://www.w3.org/1999/xlink">
16 <!-- match poem citations -->
17 <xsl:template mode="para" match="poezja_cyt">
20 <xsl:apply-templates mode="para"/>
25 <!-- regular poem elements -->
26 <xsl:template mode="para" match="strofa">
28 <xsl:call-template name="split-poem">
29 <xsl:with-param name="list" select="."/>
34 <!-- split into verses -->
35 <xsl:template name="split-poem">
36 <xsl:param name="list"></xsl:param>
38 <xsl:if test="$list != ''">
39 <xsl:variable name="before"
40 select="substring-before(concat($list, '/'), '/')"/>
41 <xsl:variable name="after"
42 select="substring-after($list, '/')"/>
45 <xsl:value-of select="$before"/>
48 <xsl:call-template name="split-poem">
49 <xsl:with-param name="list" select="$after"/>