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" />
4 <xsl:output doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" />
5 <xsl:output doctype-public="-//W3C//DTD XHTML 1.1//EN" />
7 <xsl:template match="/" >
8 <xsl:element name="html" xmlns="http://www.w3.org/1999/xhtml">
9 <xsl:element name="head">
10 <link rel="stylesheet" href="style.css" type="text/css" />
11 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
16 <xsl:element name="body" xmlns="http://www.w3.org/1999/xhtml">
17 <xsl:element name="div" xmlns="http://www.w3.org/1999/xhtml">
18 <xsl:attribute name="id">book-text</xsl:attribute>
19 <xsl:if test="//nazwa_utworu">
20 <!--h1 xmlns="http://www.w3.org/1999/xhtml"-->
21 <xsl:apply-templates select=" //nazwa_utworu" mode="poczatek"/>
22 <xsl:apply-templates select=" //podtytul" mode="poczatek"/>
25 <xsl:apply-templates />
31 <!--===========================================================-->
33 <!--===========================================================-->
35 <xsl:template match="nota">
36 <div class="note" xmlns="http://www.w3.org/1999/xhtml">
37 <xsl:apply-templates />
41 <xsl:template match="lista_osob" >
42 <div class="person-list" xmlns="http://www.w3.org/1999/xhtml">
43 <div class="h3" xmlns="http://www.w3.org/1999/xhtml">
44 <xsl:apply-templates select="child::naglowek_listy" />
46 <ol xmlns="http://www.w3.org/1999/xhtml">
47 <xsl:apply-templates select="lista_osoba" />
52 <xsl:template match="dedykacja">
53 <div class="dedication" xmlns="http://www.w3.org/1999/xhtml">
54 <xsl:apply-templates />
58 <xsl:template match="kwestia">
59 <div class="kwestia" xmlns="http://www.w3.org/1999/xhtml">
60 <xsl:apply-templates select="strofa|akapit|didaskalia|akap " />
64 <xsl:template match="dlugi_cytat|poezja_cyt">
65 <div class="block" xmlns="http://www.w3.org/1999/xhtml">
66 <xsl:apply-templates />
70 <xsl:template match="ramka">
71 <div class="frame" xmlns="http://www.w3.org/1999/xhtml">
72 <xsl:apply-templates />
76 <xsl:template match="motto">
77 <div class="motto" xmlns="http://www.w3.org/1999/xhtml">
78 <xsl:apply-templates />
82 <xsl:template match="ilustr">
84 <xsl:attribute name="src">
85 <xsl:value-of select="@src" />
87 <xsl:attribute name="alt">
88 <xsl:value-of select="@alt" />
90 <xsl:attribute name="title">
91 <xsl:value-of select="@alt" />
96 <!--===========================================================-->
97 <!-- Tagi PARAGRAFOWE -->
98 <!--===========================================================-->
100 <xsl:template match="autor_utworu" mode="poczatek">
101 <h2 class="author" xmlns="http://www.w3.org/1999/xhtml">
102 <xsl:apply-templates />
106 <xsl:template match="autor_utworu" />
108 <xsl:template match="dzielo_nadrzedne" mode="poczatek">
109 <h2 class="collection" xmlns="http://www.w3.org/1999/xhtml">
110 <xsl:apply-templates />
114 <xsl:template match="dzielo_nadrzedne" />
116 <xsl:template match="nazwa_utworu" mode="poczatek" >
117 <h2 class="intitle" xmlns="http://www.w3.org/1999/xhtml">
118 <xsl:apply-templates />
122 <xsl:template match="nazwa_utworu" />
124 <xsl:template match="podtytul" mode="poczatek">
125 <h2 class="insubtitle" xmlns="http://www.w3.org/1999/xhtml">
126 <xsl:apply-templates />
130 <xsl:template match="podtytul" />
132 <xsl:template match="naglowek_czesc|srodtytul">
133 <h2 class="h2" xmlns="http://www.w3.org/1999/xhtml">
134 <xsl:apply-templates />
138 <xsl:template match="naglowek_akt">
139 <h2 class="h2" xmlns="http://www.w3.org/1999/xhtml">
140 <xsl:apply-templates />
144 <xsl:template match="naglowek_scena">
145 <a id="sub{@sub}" xmlns="http://www.w3.org/1999/xhtml"><xsl:comment/><!-- hack to keep closing tags --></a>
146 <h2 class="h3" xmlns="http://www.w3.org/1999/xhtml">
147 <xsl:apply-templates />
151 <xsl:template match="naglowek_podrozdzial">
152 <a id="sub{@sub}" xmlns="http://www.w3.org/1999/xhtml"><xsl:comment/><!-- same as above --></a>
153 <h2 class="h4" xmlns="http://www.w3.org/1999/xhtml">
154 <xsl:apply-templates />
158 <xsl:template match="naglowek_rozdzial">
159 <h2 class="h3" xmlns="http://www.w3.org/1999/xhtml">
160 <xsl:apply-templates />
164 <xsl:template match="podtytul_czesc|podtytul_akt">
165 <h2 class="h2"><small>
166 <xsl:apply-templates />
170 <xsl:template match="podtytul_rozdzial|podtytul_scena">
171 <h2 class="h3"><small>
172 <xsl:apply-templates />
176 <xsl:template match="podtytul_podrozdzial">
177 <h2 class="h4"><small>
178 <xsl:apply-templates />
183 <xsl:template match="naglowek_osoba">
184 <h2 class="h4" xmlns="http://www.w3.org/1999/xhtml">
185 <xsl:apply-templates />
189 <xsl:template match="miejsce_czas">
190 <div class="place-and-time" xmlns="http://www.w3.org/1999/xhtml">
191 <xsl:apply-templates />
195 <xsl:template match="didaskalia">
196 <div class="didaskalia" xmlns="http://www.w3.org/1999/xhtml">
197 <xsl:apply-templates />
201 <xsl:template match="akap|akap_dialog|akap_cd">
202 <p class="paragraph" xmlns="http://www.w3.org/1999/xhtml">
203 <xsl:apply-templates />
207 <xsl:template match="strofa">
208 <div class="stanza" xmlns="http://www.w3.org/1999/xhtml">
209 <xsl:apply-templates />
210 </div><div class='stanza-spacer' xmlns="http://www.w3.org/1999/xhtml"> </div>
213 <xsl:template match="wers_normalny">
214 <div class="verse" xmlns="http://www.w3.org/1999/xhtml">
215 <xsl:apply-templates />
219 <xsl:template match="wers_akap">
220 <div class="verse" style="margin-left: 1em;" xmlns="http://www.w3.org/1999/xhtml">
221 <xsl:apply-templates />
225 <xsl:template match="wers_wciety">
226 <div class="verse" style='margin-left:1em;' xmlns="http://www.w3.org/1999/xhtml">
227 <xsl:apply-templates />
231 <xsl:template match="wers_do_prawej">
232 <div class="verse" style='text-align: right;' xmlns="http://www.w3.org/1999/xhtml">
233 <xsl:apply-templates/>
237 <xsl:template match="wers_wciety[@typ!='']">
238 <div class="verse" xmlns="http://www.w3.org/1999/xhtml">
239 <xsl:attribute name="style">
240 margin-left: <xsl:value-of select="@typ" />em;
242 <xsl:apply-templates />
246 <xsl:template match="wers_cd">
247 <div class="verse" style="margin-left: 12em;" xmlns="http://www.w3.org/1999/xhtml">
248 <xsl:apply-templates />
252 <xsl:template match="motto_podpis">
253 <div class="motto_podpis" xmlns="http://www.w3.org/1999/xhtml">
254 <xsl:apply-templates />
258 <!--===========================================================-->
259 <!-- Tagi LINIOWE -->
260 <!--===========================================================-->
262 <xsl:template match="slowo_obce">
263 <em class="foreign-word" xmlns="http://www.w3.org/1999/xhtml">
264 <xsl:apply-templates />
268 <xsl:template match="mat" >
269 <em class="math" xmlns="http://www.w3.org/1999/xhtml">
270 <xsl:apply-templates />
274 <xsl:template match="didask_tekst" >
275 <em class="didaskalia" xmlns="http://www.w3.org/1999/xhtml">
276 <xsl:apply-templates />
280 <xsl:template match="tytul_dziela" >
281 <em class="book-title" xmlns="http://www.w3.org/1999/xhtml">
282 <xsl:if test="@typ = '1'" >„</xsl:if>
283 <xsl:apply-templates />
284 <xsl:if test="@typ = '1'">”</xsl:if>
288 <xsl:template match="wyroznienie" >
289 <em class="author-emphasis" xmlns="http://www.w3.org/1999/xhtml">
290 <xsl:apply-templates />
294 <xsl:template match="wieksze_odstepy" >
295 <em class="wieksze-odstepy" xmlns="http://www.w3.org/1999/xhtml">
296 <xsl:apply-templates />
300 <xsl:template match="indeks_dolny" >
301 <sub xmlns="http://www.w3.org/1999/xhtml">
302 <xsl:apply-templates />
306 <xsl:template match="osoba" >
307 <em class="person" xmlns="http://www.w3.org/1999/xhtml">
308 <xsl:apply-templates />
312 <xsl:template match="naglowek_listy" >
313 <xsl:apply-templates />
316 <xsl:template match="lista_osoba" >
317 <li xmlns="http://www.w3.org/1999/xhtml">
318 <xsl:apply-templates />
322 <!--===========================================================-->
323 <!-- Tagi STANDALONE -->
324 <!--===========================================================-->
326 <xsl:template match="sekcja_swiatlo">
327 <p class="spacer" xmlns="http://www.w3.org/1999/xhtml"> </p>
330 <xsl:template match="sekcja_asterysk">
331 <p class="spacer-asterisk" xmlns="http://www.w3.org/1999/xhtml">*</p>
334 <xsl:template match="separator_linia">
335 <hr class="spacer-line" xmlns="http://www.w3.org/1999/xhtml"></hr>
338 <!--===========================================================-->
339 <!-- Tagi SPECJALNE -->
340 <!--===========================================================-->
342 <xsl:template match="motyw" />
344 <xsl:template match="mat">
345 <img xmlns="http://www.w3.org/1999/xhtml">
346 <xsl:attribute name="src">
347 <xsl:value-of select="wl:mathml(.)" />
352 <xsl:template match="tabela|tabelka">
354 <xsl:when test="@ramka = '1'">
355 <table class="border" xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates /></table>
358 <table xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates /></table>
362 <xsl:template match="wiersz">
363 <tr xmlns="http://www.w3.org/1999/xhtml">
364 <xsl:apply-templates />
367 <xsl:template match="kol">
368 <td xmlns="http://www.w3.org/1999/xhtml">
369 <xsl:apply-templates />
374 <!--===========================================================-->
375 <!-- Tagi IGNOROWANE -->
376 <!--===========================================================-->
378 <xsl:template match="extra" />
380 <xsl:template match="pe|pa|pr|pt" >
381 <a class="anchor" id="anchor-{.}" href="annotations.html#annotation-{.}"
382 xmlns="http://www.w3.org/1999/xhtml"><sup xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates /></sup></a>
385 <xsl:template match="uwaga" />
387 <xsl:template match="nota_red" />
388 <xsl:template match="abstrakt" />
390 <!--pominięcie tych metadanych-->
391 <xsl:template match="rdf:RDF" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />
393 <!--===========================================================-->
394 <!-- Tagi TEKSTOWE -->
395 <!--===========================================================-->
397 <xsl:template match="text()" >
398 <xsl:value-of select="." />
401 <xsl:template match="text()" >
402 <xsl:value-of select="." />