1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:wl="http://wolnelektury.pl/functions" exclude-result-prefixes="mml wl">
3 <xsl:output method="html" version="1.0" encoding="utf-8" />
5 <xsl:template match="/" >
6 <xsl:element name="html" xmlns="http://www.w3.org/1999/xhtml">
7 <xsl:element name="head">
8 <link rel="stylesheet" href="style.css" type="text/css" />
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10 <title>WolneLektury.pl</title>
12 <xsl:element name="body" xmlns="http://www.w3.org/1999/xhtml">
13 <xsl:element name="div" xmlns="http://www.w3.org/1999/xhtml">
14 <xsl:attribute name="id">book-text</xsl:attribute>
15 <xsl:if test="//nazwa_utworu">
16 <!--h1 xmlns="http://www.w3.org/1999/xhtml"-->
17 <xsl:apply-templates select=" //nazwa_utworu" mode="poczatek"/>
18 <xsl:apply-templates select=" //podtytul" mode="poczatek"/>
21 <xsl:apply-templates />
27 <!--===========================================================-->
29 <!--===========================================================-->
31 <xsl:template match="nota">
32 <div class="note" xmlns="http://www.w3.org/1999/xhtml">
33 <xsl:apply-templates />
37 <xsl:template match="lista_osob" >
38 <div class="person-list" xmlns="http://www.w3.org/1999/xhtml">
39 <div class="h3" xmlns="http://www.w3.org/1999/xhtml">
40 <xsl:apply-templates select="child::naglowek_listy" />
42 <ol xmlns="http://www.w3.org/1999/xhtml">
43 <xsl:apply-templates select="lista_osoba" />
48 <xsl:template match="dedykacja">
49 <div class="dedication" xmlns="http://www.w3.org/1999/xhtml">
50 <xsl:apply-templates />
54 <xsl:template match="kwestia">
55 <div class="kwestia" xmlns="http://www.w3.org/1999/xhtml">
56 <xsl:apply-templates select="strofa|akapit|didaskalia|akap " />
60 <xsl:template match="dlugi_cytat|poezja_cyt">
61 <div class="block" xmlns="http://www.w3.org/1999/xhtml">
62 <xsl:apply-templates />
66 <xsl:template match="ramka">
67 <div class="frame" xmlns="http://www.w3.org/1999/xhtml">
68 <xsl:apply-templates />
72 <xsl:template match="motto">
73 <div class="motto" xmlns="http://www.w3.org/1999/xhtml">
74 <xsl:apply-templates />
78 <xsl:template match="ilustr">
80 <xsl:attribute name="alt">
81 <xsl:value-of select="@alt" />
83 <xsl:attribute name="src">
84 <xsl:value-of select="@src" />
86 <xsl:attribute name="title">
87 <xsl:value-of select="@alt" />
92 <!--===========================================================-->
93 <!-- Tagi PARAGRAFOWE -->
94 <!--===========================================================-->
96 <xsl:template match="autor_utworu" mode="poczatek">
97 <h2 class="author" xmlns="http://www.w3.org/1999/xhtml">
98 <xsl:apply-templates />
102 <xsl:template match="autor_utworu" />
104 <xsl:template match="dzielo_nadrzedne" mode="poczatek">
105 <h2 class="collection" xmlns="http://www.w3.org/1999/xhtml">
106 <xsl:apply-templates />
110 <xsl:template match="dzielo_nadrzedne" />
112 <xsl:template match="nazwa_utworu" mode="poczatek" >
113 <h2 class="intitle" xmlns="http://www.w3.org/1999/xhtml">
114 <xsl:apply-templates />
118 <xsl:template match="nazwa_utworu" />
120 <xsl:template match="podtytul" mode="poczatek">
121 <h2 class="insubtitle" xmlns="http://www.w3.org/1999/xhtml">
122 <xsl:apply-templates />
126 <xsl:template match="podtytul" />
128 <xsl:template match="naglowek_czesc|srodtytul">
129 <h2 class="h2" xmlns="http://www.w3.org/1999/xhtml">
130 <xsl:apply-templates />
134 <xsl:template match="naglowek_akt">
135 <h2 class="h2" xmlns="http://www.w3.org/1999/xhtml">
136 <xsl:apply-templates />
140 <xsl:template match="naglowek_scena">
141 <a id="sub{@sub}" xmlns="http://www.w3.org/1999/xhtml"><xsl:comment/><!-- hack to keep closing tags --></a>
142 <h2 class="h3" xmlns="http://www.w3.org/1999/xhtml">
143 <xsl:apply-templates />
147 <xsl:template match="naglowek_podrozdzial">
148 <a id="sub{@sub}" xmlns="http://www.w3.org/1999/xhtml"><xsl:comment/><!-- same as above --></a>
149 <h2 class="h4" xmlns="http://www.w3.org/1999/xhtml">
150 <xsl:apply-templates />
154 <xsl:template match="naglowek_rozdzial">
155 <h2 class="h3" xmlns="http://www.w3.org/1999/xhtml">
156 <xsl:apply-templates />
160 <xsl:template match="podtytul_czesc|podtytul_akt">
161 <h2 class="h2"><small>
162 <xsl:apply-templates />
166 <xsl:template match="podtytul_rozdzial|podtytul_scena">
167 <h2 class="h3"><small>
168 <xsl:apply-templates />
172 <xsl:template match="podtytul_podrozdzial">
173 <h2 class="h4"><small>
174 <xsl:apply-templates />
179 <xsl:template match="naglowek_osoba">
180 <h2 class="h4" xmlns="http://www.w3.org/1999/xhtml">
181 <xsl:apply-templates />
185 <xsl:template match="miejsce_czas">
186 <div class="place-and-time" xmlns="http://www.w3.org/1999/xhtml">
187 <xsl:apply-templates />
191 <xsl:template match="didaskalia">
192 <div class="didaskalia" xmlns="http://www.w3.org/1999/xhtml">
193 <xsl:apply-templates />
197 <xsl:template match="akap|akap_dialog|akap_cd">
198 <p class="paragraph" xmlns="http://www.w3.org/1999/xhtml">
199 <xsl:apply-templates />
203 <xsl:template match="strofa">
204 <div class="stanza" xmlns="http://www.w3.org/1999/xhtml">
205 <xsl:apply-templates />
206 </div><div class='stanza-spacer' xmlns="http://www.w3.org/1999/xhtml"> </div>
209 <xsl:template match="wers_normalny">
210 <div class="verse" xmlns="http://www.w3.org/1999/xhtml">
211 <xsl:apply-templates />
215 <xsl:template match="wers_akap">
216 <div class="verse" style="margin-left: 1em;" xmlns="http://www.w3.org/1999/xhtml">
217 <xsl:apply-templates />
221 <xsl:template match="wers_wciety">
222 <div class="verse" style='margin-left:1em;' xmlns="http://www.w3.org/1999/xhtml">
223 <xsl:apply-templates />
227 <xsl:template match="wers_do_prawej">
228 <div class="verse" style='text-align: right;' xmlns="http://www.w3.org/1999/xhtml">
229 <xsl:apply-templates/>
233 <xsl:template match="wers_wciety[@typ!='']">
234 <div class="verse" xmlns="http://www.w3.org/1999/xhtml">
235 <xsl:attribute name="style">
236 margin-left: <xsl:value-of select="@typ" />em;
238 <xsl:apply-templates />
242 <xsl:template match="wers_cd">
243 <div class="verse" style="margin-left: 12em;" xmlns="http://www.w3.org/1999/xhtml">
244 <xsl:apply-templates />
248 <xsl:template match="motto_podpis">
249 <div class="motto_podpis" xmlns="http://www.w3.org/1999/xhtml">
250 <xsl:apply-templates />
254 <!--===========================================================-->
255 <!-- Tagi LINIOWE -->
256 <!--===========================================================-->
258 <xsl:template match="slowo_obce">
259 <em class="foreign-word" xmlns="http://www.w3.org/1999/xhtml">
260 <xsl:apply-templates />
264 <xsl:template match="mat" >
265 <em class="math" xmlns="http://www.w3.org/1999/xhtml">
266 <xsl:apply-templates />
270 <xsl:template match="didask_tekst" >
271 <em class="didaskalia" xmlns="http://www.w3.org/1999/xhtml">
272 <xsl:apply-templates />
276 <xsl:template match="tytul_dziela" >
277 <em class="book-title" xmlns="http://www.w3.org/1999/xhtml">
278 <xsl:if test="@typ = '1'" >„</xsl:if>
279 <xsl:apply-templates />
280 <xsl:if test="@typ = '1'">”</xsl:if>
284 <xsl:template match="wyroznienie" >
285 <em class="author-emphasis" xmlns="http://www.w3.org/1999/xhtml">
286 <xsl:apply-templates />
290 <xsl:template match="wieksze_odstepy" >
291 <em class="wieksze-odstepy" xmlns="http://www.w3.org/1999/xhtml">
292 <xsl:apply-templates />
296 <xsl:template match="indeks_dolny" >
297 <sub xmlns="http://www.w3.org/1999/xhtml">
298 <xsl:apply-templates />
302 <xsl:template match="osoba" >
303 <em class="person" xmlns="http://www.w3.org/1999/xhtml">
304 <xsl:apply-templates />
308 <xsl:template match="naglowek_listy" >
309 <xsl:apply-templates />
312 <xsl:template match="lista_osoba" >
313 <li xmlns="http://www.w3.org/1999/xhtml">
314 <xsl:apply-templates />
318 <!--===========================================================-->
319 <!-- Tagi STANDALONE -->
320 <!--===========================================================-->
322 <xsl:template match="sekcja_swiatlo">
323 <p class="spacer" xmlns="http://www.w3.org/1999/xhtml"> </p>
326 <xsl:template match="sekcja_asterysk">
327 <p class="spacer-asterisk" xmlns="http://www.w3.org/1999/xhtml">*</p>
330 <xsl:template match="separator_linia">
331 <hr class="spacer-line" xmlns="http://www.w3.org/1999/xhtml"></hr>
334 <!--===========================================================-->
335 <!-- Tagi SPECJALNE -->
336 <!--===========================================================-->
338 <xsl:template match="motyw" />
340 <xsl:template match="mat">
341 <img xmlns="http://www.w3.org/1999/xhtml">
342 <xsl:attribute name="src">
343 <xsl:value-of select="wl:mathml(.)" />
348 <xsl:template match="tabela|tabelka">
350 <xsl:when test="@ramka = '1'">
351 <table class="border" xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates /></table>
354 <table xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates /></table>
358 <xsl:template match="wiersz">
359 <tr xmlns="http://www.w3.org/1999/xhtml">
360 <xsl:apply-templates />
363 <xsl:template match="kol">
364 <td xmlns="http://www.w3.org/1999/xhtml">
365 <xsl:apply-templates />
370 <!--===========================================================-->
371 <!-- Tagi IGNOROWANE -->
372 <!--===========================================================-->
374 <xsl:template match="extra" />
376 <xsl:template match="pe|pa|pr|pt" >
377 <a class="anchor" href="annotations.xhtml#annotation-{.}" id="anchor-{.}"
378 xmlns="http://www.w3.org/1999/xhtml"><sup xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates /></sup></a>
381 <xsl:template match="uwaga" />
383 <xsl:template match="nota_red" />
384 <xsl:template match="abstrakt" />
386 <!--pominięcie tych metadanych-->
387 <xsl:template match="rdf:RDF" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />
389 <!--===========================================================-->
390 <!-- Tagi TEKSTOWE -->
391 <!--===========================================================-->
393 <xsl:template match="text()" >
394 <xsl:value-of select="." />
397 <xsl:template match="text()" >
398 <xsl:value-of select="." />