1 <?xml version="1.0" encoding="utf-8"?>
5 xmlns:wlml="http://nowoczesnapolska.org.pl/ML/Lektury/1.1"
7 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8 xmlns:fo="http://www.w3.org/1999/XSL/Format"
9 xmlns:wl="http://wolnelektury.pl/functions" >
11 <xsl:output method="xml"
14 omit-xml-declaration = "yes" />
16 <!-- generic template parameters -->
18 <xsl:param name="verse-numbers-interval" select="5" />
20 <!-- main templates -->
22 <xsl:template match="/">
25 <fo:layout-master-set>
26 <!-- layout information -->
27 <fo:simple-page-master
28 master-name="title-page"
36 </fo:simple-page-master>
38 <fo:simple-page-master
39 master-name="blank-page"
48 </fo:simple-page-master>
50 <fo:simple-page-master
51 master-name="first-main"
60 margin-bottom="2cm" />
62 region-name="odd-after"
65 </fo:simple-page-master>
67 <fo:simple-page-master
77 margin-bottom="2cm" />
80 region-name="odd-before"
84 region-name="odd-after"
87 </fo:simple-page-master>
89 <fo:simple-page-master
99 margin-bottom="2cm" />
102 region-name="even-before"
106 region-name="even-after"
107 display-align="after"
109 </fo:simple-page-master>
112 <fo:page-sequence-master master-name="book-titles">
113 <fo:single-page-master-reference master-reference="title-page" />
114 <fo:repeatable-page-master-reference master-reference="blank-page" />
115 </fo:page-sequence-master>
117 <fo:page-sequence-master master-name="main">
118 <fo:repeatable-page-master-alternatives>
119 <fo:conditional-page-master-reference
120 master-reference="first-main"
121 page-position="first"
124 <fo:conditional-page-master-reference
125 master-reference="odd"
129 <fo:conditional-page-master-reference
130 master-reference="even"
132 odd-or-even="even" />
133 </fo:repeatable-page-master-alternatives>
135 </fo:page-sequence-master>
137 </fo:layout-master-set>
138 <!-- end: defines page layout -->
141 TITLE PAGE, COPYRIGHT, ETC. \
144 master-reference="book-titles">
146 <fo:flow flow-name="xsl-region-body"
147 font-family="Antique"
151 <fo:block font-size="32pt" display-align="center" >
152 <fo:marker marker-class-name="author">
153 <xsl:value-of select="//wlml:author" />
155 <xsl:apply-templates select="//wlml:author/node()" mode="title"/>
158 <fo:block font-size="48pt" display-align="center" >
159 <fo:marker marker-class-name="main-title">
160 <xsl:value-of select="//wlml:title" />
162 <xsl:apply-templates select="//wlml:title/node()" mode="title"/>
171 master-reference="main"
172 initial-page-number="1"
173 force-page-count="even"
177 flow-name="xsl-footnote-separator">
178 <fo:block text-align-last="justify">
179 <fo:leader leader-pattern="rule"/>
184 flow-name="odd-after" font-family="Antique" text-align="center">
191 flow-name="even-after" font-family="Antique" text-align="center">
199 flow-name="even-before"
200 font-family="Antique"
203 <fo:block border-bottom-width="0.2mm"
204 border-bottom-style="solid"
205 border-bottom-color="black">
206 <fo:retrieve-marker retrieve-class-name="main-title" />
211 flow-name="odd-before"
212 font-family="Antique"
215 <fo:block border-after-width="0.2mm"
216 border-after-style="solid"
217 border-after-color="black">
218 <fo:retrieve-marker retrieve-class-name="chapter-title" />
224 <fo:flow flow-name="xsl-region-body" font-family="Antique">
226 <fo:marker marker-class-name="author">
227 <xsl:value-of select="//wlml:author" />
229 <fo:marker marker-class-name="main-title">
230 <xsl:value-of select="//wlml:title" />
233 <xsl:apply-templates select="//wlml:main-text" />
240 <xsl:template match="wlml:main-text">
241 <xsl:apply-templates select="child::*" />
245 PROZA: elementy proste
248 <xsl:template match="wlml:chapter">
249 <fo:block text-align="left" font-size="32pt" font-weight="bold" font-variant="small-caps">
250 <fo:marker marker-class-name="chapter-title">
251 <xsl:apply-templates select="node()" />
253 <xsl:apply-templates select="node()" />
257 <xsl:template match="wlml:p">
261 start-indent="1.5em">
262 <xsl:apply-templates select="child::node()" />
266 <xsl:template match="wlml:pd">
272 <xsl:apply-templates select="child::node()" />
276 <xsl:template match="wlml:pd/text()[1]">
277 <xsl:value-of select="substring-after(., '— ')" />
283 <xsl:template match="wlml:stanza">
285 space-before="1.5em" space-after="1.5em">
286 <xsl:apply-templates select="child::node()" />
290 <xsl:template match="wlml:v|wlml:vi|wlml:vc">
292 <xsl:attribute name="id"><xsl:value-of select="local-name()"/>-<xsl:value-of select="generate-id()"/></xsl:attribute>
294 <xsl:if test="count(preceding-sibling::wlml:v|preceding-sibling::wlml:vi|preceding-sibling::wlml:vc) < 2">
295 <xsl:attribute name="keep-with-previous.within-page">always</xsl:attribute>
298 <xsl:if test="count(following-sibling::wlml:v|following-sibling::wlml:vi|following-sibling::wlml:vc) < 2">
299 <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
302 <xsl:variable name="vc"><xsl:number count="wlml:v|wlml:vi|wlml:vc" level="any" from="wlml:chapter" /></xsl:variable>
304 <fo:list-item-label start-indent="-1cm">
305 <fo:block><xsl:if test="($vc mod 5) = 0"><xsl:value-of select="$vc" /></xsl:if></fo:block>
306 </fo:list-item-label>
307 <fo:list-item-body start-indent="0cm">
308 <fo:block><xsl:apply-templates select="node()" /></fo:block>
316 <xsl:template match="wlml:df">
317 <fo:inline font-style="italic">
318 <xsl:apply-templates select="node()" />
326 <xsl:template match="wlml:mark[//wlml:annotation/@refs = @id]">
327 <xsl:variable name="annot" select="//wlml:annotation[@refs = current()/@id]" />
329 <fo:inline><xsl:number level="any" /></fo:inline>
331 <fo:block><xsl:apply-templates select="$annot/node()" /></fo:block>
336 <xsl:template match="*" />