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" />
14 <xsl:element name="body" xmlns="http://www.w3.org/1999/xhtml">
15 <xsl:element name="div" xmlns="http://www.w3.org/1999/xhtml">
16 <xsl:attribute name="id">book-text</xsl:attribute>
17 <xsl:if test="//nazwa_utworu">
18 <!--h1 xmlns="http://www.w3.org/1999/xhtml"-->
19 <xsl:apply-templates select=" //nazwa_utworu" mode="poczatek"/>
20 <xsl:apply-templates select=" //podtytul" mode="poczatek"/>
23 <xsl:apply-templates />
29 <!--===========================================================-->
31 <!--===========================================================-->
33 <xsl:template match="nota">
34 <div class="note" xmlns="http://www.w3.org/1999/xhtml">
35 <xsl:apply-templates />
39 <xsl:template match="lista_osob" >
40 <div class="person-list" xmlns="http://www.w3.org/1999/xhtml">
41 <div class="h3" xmlns="http://www.w3.org/1999/xhtml">
42 <xsl:apply-templates select="child::naglowek_listy" />
44 <ol xmlns="http://www.w3.org/1999/xhtml">
45 <xsl:apply-templates select="lista_osoba" />
50 <xsl:template match="dedykacja">
51 <div class="dedication" xmlns="http://www.w3.org/1999/xhtml">
52 <xsl:apply-templates />
56 <xsl:template match="kwestia">
57 <div class="kwestia" xmlns="http://www.w3.org/1999/xhtml">
58 <xsl:apply-templates select="strofa|akapit|didaskalia|akap " />
62 <xsl:template match="dlugi_cytat|poezja_cyt">
63 <div class="block" xmlns="http://www.w3.org/1999/xhtml">
64 <xsl:apply-templates />
68 <xsl:template match="ramka">
69 <div class="frame" xmlns="http://www.w3.org/1999/xhtml">
70 <xsl:apply-templates />
74 <xsl:template match="motto">
75 <div class="motto" xmlns="http://www.w3.org/1999/xhtml">
76 <xsl:apply-templates />
80 <xsl:template match="ilustr">
82 <xsl:attribute name="src">
83 <xsl:value-of select="@src" />
85 <xsl:attribute name="alt">
86 <xsl:value-of select="@alt" />
88 <xsl:attribute name="title">
89 <xsl:value-of select="@alt" />
94 <!--===========================================================-->
95 <!-- Tagi PARAGRAFOWE -->
96 <!--===========================================================-->
98 <xsl:template match="autor_utworu" mode="poczatek">
99 <h2 class="author" xmlns="http://www.w3.org/1999/xhtml">
100 <xsl:apply-templates />
104 <xsl:template match="autor_utworu" />
106 <xsl:template match="dzielo_nadrzedne" mode="poczatek">
107 <h2 class="collection" xmlns="http://www.w3.org/1999/xhtml">
108 <xsl:apply-templates />
112 <xsl:template match="dzielo_nadrzedne" />
114 <xsl:template match="nazwa_utworu" mode="poczatek" >
115 <h2 class="intitle" xmlns="http://www.w3.org/1999/xhtml">
116 <xsl:apply-templates />
120 <xsl:template match="nazwa_utworu" />
122 <xsl:template match="podtytul" mode="poczatek">
123 <h2 class="insubtitle" xmlns="http://www.w3.org/1999/xhtml">
124 <xsl:apply-templates />
128 <xsl:template match="podtytul" />
130 <xsl:template match="naglowek_czesc|srodtytul">
131 <h2 class="h2" xmlns="http://www.w3.org/1999/xhtml">
132 <xsl:apply-templates />
136 <xsl:template match="naglowek_akt">
137 <h2 class="h2" xmlns="http://www.w3.org/1999/xhtml">
138 <xsl:apply-templates />
142 <xsl:template match="naglowek_scena">
143 <a id="sub{@sub}" xmlns="http://www.w3.org/1999/xhtml"><xsl:comment/><!-- hack to keep closing tags --></a>
144 <h2 class="h3" xmlns="http://www.w3.org/1999/xhtml">
145 <xsl:apply-templates />
149 <xsl:template match="naglowek_podrozdzial">
150 <a id="sub{@sub}" xmlns="http://www.w3.org/1999/xhtml"><xsl:comment/><!-- same as above --></a>
151 <h2 class="h4" xmlns="http://www.w3.org/1999/xhtml">
152 <xsl:apply-templates />
156 <xsl:template match="naglowek_rozdzial">
157 <h2 class="h3" xmlns="http://www.w3.org/1999/xhtml">
158 <xsl:apply-templates />
162 <xsl:template match="podtytul_czesc|podtytul_akt">
163 <h2 class="h2"><small>
164 <xsl:apply-templates />
168 <xsl:template match="podtytul_rozdzial|podtytul_scena">
169 <h2 class="h3"><small>
170 <xsl:apply-templates />
174 <xsl:template match="podtytul_podrozdzial">
175 <h2 class="h4"><small>
176 <xsl:apply-templates />
181 <xsl:template match="naglowek_osoba">
182 <h2 class="h4" xmlns="http://www.w3.org/1999/xhtml">
183 <xsl:apply-templates />
187 <xsl:template match="miejsce_czas">
188 <div class="place-and-time" xmlns="http://www.w3.org/1999/xhtml">
189 <xsl:apply-templates />
193 <xsl:template match="didaskalia">
194 <div class="didaskalia" xmlns="http://www.w3.org/1999/xhtml">
195 <xsl:apply-templates />
199 <xsl:template match="akap|akap_dialog|akap_cd">
200 <p class="paragraph" xmlns="http://www.w3.org/1999/xhtml">
201 <xsl:apply-templates />
205 <xsl:template match="strofa">
206 <div class="stanza" xmlns="http://www.w3.org/1999/xhtml">
207 <xsl:apply-templates />
208 </div><div class='stanza-spacer' xmlns="http://www.w3.org/1999/xhtml"> </div>
211 <xsl:template match="wers_normalny">
212 <div class="verse" xmlns="http://www.w3.org/1999/xhtml">
213 <xsl:apply-templates />
217 <xsl:template match="wers_akap">
218 <div class="verse" style="margin-left: 1em;" xmlns="http://www.w3.org/1999/xhtml">
219 <xsl:apply-templates />
223 <xsl:template match="wers_wciety">
224 <div class="verse" style='margin-left:1em;' xmlns="http://www.w3.org/1999/xhtml">
225 <xsl:apply-templates />
229 <xsl:template match="wers_do_prawej">
230 <div class="verse" style='text-align: right;' xmlns="http://www.w3.org/1999/xhtml">
231 <xsl:apply-templates/>
235 <xsl:template match="wers_wciety[@typ!='']">
236 <div class="verse" xmlns="http://www.w3.org/1999/xhtml">
237 <xsl:attribute name="style">
238 margin-left: <xsl:value-of select="@typ" />em;
240 <xsl:apply-templates />
244 <xsl:template match="wers_cd">
245 <div class="verse" style="margin-left: 12em;" xmlns="http://www.w3.org/1999/xhtml">
246 <xsl:apply-templates />
250 <xsl:template match="motto_podpis">
251 <div class="motto_podpis" xmlns="http://www.w3.org/1999/xhtml">
252 <xsl:apply-templates />
256 <!--===========================================================-->
257 <!-- Tagi LINIOWE -->
258 <!--===========================================================-->
260 <xsl:template match="slowo_obce">
261 <em class="foreign-word" xmlns="http://www.w3.org/1999/xhtml">
262 <xsl:apply-templates />
266 <xsl:template match="mat" >
267 <em class="math" xmlns="http://www.w3.org/1999/xhtml">
268 <xsl:apply-templates />
272 <xsl:template match="didask_tekst" >
273 <em class="didaskalia" xmlns="http://www.w3.org/1999/xhtml">
274 <xsl:apply-templates />
278 <xsl:template match="tytul_dziela" >
279 <em class="book-title" xmlns="http://www.w3.org/1999/xhtml">
280 <xsl:if test="@typ = '1'" >„</xsl:if>
281 <xsl:apply-templates />
282 <xsl:if test="@typ = '1'">”</xsl:if>
286 <xsl:template match="wyroznienie" >
287 <em class="author-emphasis" xmlns="http://www.w3.org/1999/xhtml">
288 <xsl:apply-templates />
292 <xsl:template match="wieksze_odstepy" >
293 <em class="wieksze-odstepy" xmlns="http://www.w3.org/1999/xhtml">
294 <xsl:apply-templates />
298 <xsl:template match="indeks_dolny" >
299 <sub xmlns="http://www.w3.org/1999/xhtml">
300 <xsl:apply-templates />
304 <xsl:template match="osoba" >
305 <em class="person" xmlns="http://www.w3.org/1999/xhtml">
306 <xsl:apply-templates />
310 <xsl:template match="naglowek_listy" >
311 <xsl:apply-templates />
314 <xsl:template match="lista_osoba" >
315 <li xmlns="http://www.w3.org/1999/xhtml">
316 <xsl:apply-templates />
320 <!--===========================================================-->
321 <!-- Tagi STANDALONE -->
322 <!--===========================================================-->
324 <xsl:template match="sekcja_swiatlo">
325 <p class="spacer" xmlns="http://www.w3.org/1999/xhtml"> </p>
328 <xsl:template match="sekcja_asterysk">
329 <p class="spacer-asterisk" xmlns="http://www.w3.org/1999/xhtml">*</p>
332 <xsl:template match="separator_linia">
333 <hr class="spacer-line" xmlns="http://www.w3.org/1999/xhtml"></hr>
336 <!--===========================================================-->
337 <!-- Tagi SPECJALNE -->
338 <!--===========================================================-->
340 <xsl:template match="motyw" />
342 <xsl:template match="mat">
343 <img xmlns="http://www.w3.org/1999/xhtml">
344 <xsl:attribute name="src">
345 <xsl:value-of select="wl:mathml(.)" />
350 <xsl:template match="tabela|tabelka">
352 <xsl:when test="@ramka = '1'">
353 <table class="border" xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates /></table>
356 <table xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates /></table>
360 <xsl:template match="wiersz">
361 <tr xmlns="http://www.w3.org/1999/xhtml">
362 <xsl:apply-templates />
365 <xsl:template match="kol">
366 <td xmlns="http://www.w3.org/1999/xhtml">
367 <xsl:apply-templates />
372 <!--===========================================================-->
373 <!-- Tagi IGNOROWANE -->
374 <!--===========================================================-->
376 <xsl:template match="extra" />
378 <xsl:template match="pe|pa|pr|pt" >
379 <a class="anchor" id="anchor-{.}" href="annotations.xhtml#annotation-{.}"
380 xmlns="http://www.w3.org/1999/xhtml"><sup xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates /></sup></a>
383 <xsl:template match="uwaga" />
385 <xsl:template match="nota_red" />
386 <xsl:template match="abstrakt" />
388 <!--pominięcie tych metadanych-->
389 <xsl:template match="rdf:RDF" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />
391 <!--===========================================================-->
392 <!-- Tagi TEKSTOWE -->
393 <!--===========================================================-->
395 <xsl:template match="text()" >
396 <xsl:value-of select="." />
399 <xsl:template match="text()" >
400 <xsl:value-of select="." />