joined epubs, with no themes
[librarian.git] / librarian / epub / xsltScheme.xsl
1 <?xml version="1.0" encoding="utf-8"?>\r
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\r
3   <xsl:output method="html" version="1.0" encoding="utf-8" />\r
4   <xsl:output doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" />\r
5   <xsl:output doctype-public="-//W3C//DTD XHTML 1.1//EN" />\r
6 \r
7   <xsl:template match="/" >\r
8     <xsl:element name="html" xmlns="http://www.w3.org/1999/xhtml">\r
9       <xsl:element name="head">\r
10         <link rel="stylesheet" href="style.css" type="text/css" />\r
11         <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />\r
12         <title>\r
13           WolneLektury.pl\r
14         </title>\r
15       </xsl:element>\r
16       <xsl:element name="body" xmlns="http://www.w3.org/1999/xhtml">\r
17         <xsl:element name="div" xmlns="http://www.w3.org/1999/xhtml">\r
18           <xsl:attribute name="id">book-text</xsl:attribute>\r
19           <xsl:if test="//nazwa_utworu">\r
20             <!--h1 xmlns="http://www.w3.org/1999/xhtml"-->\r
21               <xsl:apply-templates select=" //nazwa_utworu" mode="poczatek"/>\r
22             <!--/h1-->\r
23           </xsl:if>\r
24           <xsl:apply-templates />\r
25         </xsl:element>\r
26       </xsl:element>\r
27     </xsl:element>\r
28   </xsl:template>\r
29 \r
30   <!--===========================================================-->\r
31   <!-- Tagi BLOKOWE -->\r
32   <!--===========================================================-->\r
33 \r
34   <xsl:template match="nota">\r
35     <div class="note" xmlns="http://www.w3.org/1999/xhtml">\r
36       <xsl:apply-templates />\r
37     </div>\r
38   </xsl:template>\r
39 \r
40   <xsl:template match="lista_osob" >\r
41     <div class="person-list" xmlns="http://www.w3.org/1999/xhtml">\r
42       <div class="h3" xmlns="http://www.w3.org/1999/xhtml">\r
43         <xsl:apply-templates select="child::naglowek_listy" />\r
44       </div>\r
45       <ol xmlns="http://www.w3.org/1999/xhtml">\r
46         <xsl:apply-templates select="lista_osoba" />\r
47       </ol>\r
48     </div>\r
49   </xsl:template>\r
50 \r
51   <xsl:template match="dedykacja">\r
52     <div class="dedication" xmlns="http://www.w3.org/1999/xhtml">\r
53       <xsl:apply-templates />\r
54     </div>\r
55   </xsl:template>\r
56 \r
57   <xsl:template match="kwestia">\r
58     <div class="kwestia" xmlns="http://www.w3.org/1999/xhtml">\r
59       <xsl:apply-templates select="strofa|akapit|didaskalia|akap " />\r
60     </div>\r
61   </xsl:template>\r
62 \r
63   <xsl:template match="dlugi_cytat|poezja_cyt">\r
64     <div class="block" xmlns="http://www.w3.org/1999/xhtml">\r
65       <xsl:apply-templates />\r
66     </div>\r
67   </xsl:template>\r
68 \r
69   <xsl:template match="motto">\r
70     <div class="motto" xmlns="http://www.w3.org/1999/xhtml">\r
71       <xsl:apply-templates />\r
72     </div>\r
73   </xsl:template>\r
74 \r
75   <!--===========================================================-->\r
76   <!-- Tagi PARAGRAFOWE -->\r
77   <!--===========================================================-->\r
78 \r
79   <xsl:template match="autor_utworu" mode="poczatek">\r
80     <h2 class="author" xmlns="http://www.w3.org/1999/xhtml">\r
81       <xsl:apply-templates />\r
82     </h2>\r
83   </xsl:template>\r
84 \r
85   <xsl:template match="autor_utworu" />\r
86 \r
87   <xsl:template match="dzielo_nadrzedne" mode="poczatek">\r
88     <h2 class="collection" xmlns="http://www.w3.org/1999/xhtml">\r
89       <xsl:apply-templates />\r
90     </h2>\r
91   </xsl:template>\r
92 \r
93   <xsl:template match="dzielo_nadrzedne" />\r
94 \r
95   <xsl:template match="nazwa_utworu" mode="poczatek" >\r
96     <h2 class="author" xmlns="http://www.w3.org/1999/xhtml">\r
97       <xsl:apply-templates />\r
98     </h2>\r
99   </xsl:template>\r
100 \r
101   <xsl:template match="nazwa_utworu" />\r
102 \r
103   <xsl:template match="podtytul" mode="poczatek">\r
104     <h2 class="subtitle" xmlns="http://www.w3.org/1999/xhtml">\r
105       <xsl:apply-templates />\r
106     </h2>\r
107   </xsl:template>\r
108 \r
109   <xsl:template match="podtytul" />\r
110 \r
111   <xsl:template match="naglowek_czesc|srodtytul">\r
112     <h2 class="h2" xmlns="http://www.w3.org/1999/xhtml">\r
113       <xsl:apply-templates />\r
114     </h2>\r
115   </xsl:template>\r
116 \r
117   <xsl:template match="naglowek_akt">\r
118     <h2 class="h2" xmlns="http://www.w3.org/1999/xhtml">\r
119       <xsl:apply-templates />\r
120     </h2>\r
121   </xsl:template>\r
122 \r
123   <xsl:template match="naglowek_scena">\r
124     <a id="sub{@sub}" xmlns="http://www.w3.org/1999/xhtml"></a>\r
125     <h2 class="h3" xmlns="http://www.w3.org/1999/xhtml">\r
126       <xsl:apply-templates />\r
127     </h2>\r
128   </xsl:template>\r
129 \r
130   <xsl:template match="naglowek_podrozdzial">\r
131     <a id="sub{@sub}" xmlns="http://www.w3.org/1999/xhtml"></a>\r
132     <h2 class="h4" xmlns="http://www.w3.org/1999/xhtml">\r
133       <xsl:apply-templates />\r
134     </h2>\r
135   </xsl:template>\r
136 \r
137   <xsl:template match="naglowek_rozdzial">\r
138     <h2 class="h3" xmlns="http://www.w3.org/1999/xhtml">\r
139       <xsl:apply-templates />\r
140     </h2>\r
141   </xsl:template>\r
142 \r
143   <xsl:template match="naglowek_osoba">\r
144     <h2 class="h4" xmlns="http://www.w3.org/1999/xhtml">\r
145       <xsl:apply-templates />\r
146     </h2>\r
147   </xsl:template>\r
148 \r
149   <xsl:template match="miejsce_czas">\r
150     <div class="place-and-time" xmlns="http://www.w3.org/1999/xhtml">\r
151       <xsl:apply-templates />\r
152     </div>\r
153   </xsl:template>\r
154 \r
155   <xsl:template match="didaskalia">\r
156     <div class="didaskalia" xmlns="http://www.w3.org/1999/xhtml">\r
157       <xsl:apply-templates />\r
158     </div>\r
159   </xsl:template>\r
160 \r
161   <xsl:template match="akap|akap_dialog|akap_cd">\r
162     <div class="paragraph" xmlns="http://www.w3.org/1999/xhtml">\r
163       <xsl:apply-templates />\r
164     </div>\r
165   </xsl:template>\r
166 \r
167   <xsl:template match="strofa">\r
168     <div class="stanza" xmlns="http://www.w3.org/1999/xhtml">\r
169       <xsl:apply-templates />\r
170     </div>\r
171   </xsl:template>\r
172 \r
173   <xsl:template match="wers_normalny">\r
174     <div class="verse" xmlns="http://www.w3.org/1999/xhtml">\r
175       <xsl:apply-templates />\r
176     </div>\r
177   </xsl:template>\r
178 \r
179   <xsl:template match="wers_wciety">\r
180     <div class="verse" style="padding-left: 1em;" xmlns="http://www.w3.org/1999/xhtml">\r
181       <xsl:apply-templates />\r
182     </div>\r
183   </xsl:template>\r
184 \r
185   <xsl:template match="wers_wciety[@typ='1']">\r
186     <div class="verse" style="padding-left: 1em;" xmlns="http://www.w3.org/1999/xhtml">\r
187       <xsl:apply-templates />\r
188     </div>\r
189   </xsl:template>\r
190 \r
191   <xsl:template match="wers_wciety[@typ='2']">\r
192     <div class="verse" style="padding-left: 2em;" xmlns="http://www.w3.org/1999/xhtml">\r
193       <xsl:apply-templates />\r
194     </div>\r
195   </xsl:template>\r
196 \r
197   <xsl:template match="wers_wciety[@typ='3']">\r
198     <div class="verse" style="padding-left: 3em;" xmlns="http://www.w3.org/1999/xhtml">\r
199       <xsl:apply-templates />\r
200     </div>\r
201   </xsl:template>\r
202 \r
203   <xsl:template match="wers_wciety[@typ='4']">\r
204     <div class="verse" style="padding-left: 4em;" xmlns="http://www.w3.org/1999/xhtml">\r
205       <xsl:apply-templates />\r
206     </div>\r
207   </xsl:template>\r
208 \r
209   <xsl:template match="wers_wciety[@typ='5']">\r
210     <div class="verse" style="padding-left: 5em;" xmlns="http://www.w3.org/1999/xhtml">\r
211       <xsl:apply-templates />\r
212     </div>\r
213   </xsl:template>\r
214 \r
215   <xsl:template match="wers_wciety[@typ='6']">\r
216     <div class="verse" style="padding-left: 6em;" xmlns="http://www.w3.org/1999/xhtml">\r
217       <xsl:apply-templates />\r
218     </div>\r
219   </xsl:template>\r
220 \r
221   <xsl:template match="wers_cd">\r
222     <div class="verse" style="padding-left: 12em;" xmlns="http://www.w3.org/1999/xhtml">\r
223       <xsl:apply-templates />\r
224     </div>\r
225   </xsl:template>\r
226 \r
227   <xsl:template match="motto_podpis">\r
228     <div class="motto_podpis" xmlns="http://www.w3.org/1999/xhtml">\r
229       <xsl:apply-templates />\r
230     </div>\r
231   </xsl:template>\r
232 \r
233   <!--===========================================================-->\r
234   <!-- Tagi LINIOWE -->\r
235   <!--===========================================================-->\r
236 \r
237   <xsl:template match="slowo_obce">\r
238     <em class="foreign-word" xmlns="http://www.w3.org/1999/xhtml">\r
239       <xsl:apply-templates />\r
240     </em>\r
241   </xsl:template>\r
242 \r
243   <xsl:template match="mat" >\r
244     <em class="math" xmlns="http://www.w3.org/1999/xhtml">\r
245       <xsl:apply-templates />\r
246     </em>\r
247   </xsl:template>\r
248 \r
249   <xsl:template match="didask_tekst" >\r
250     <em class="didaskalia" xmlns="http://www.w3.org/1999/xhtml">\r
251       <xsl:apply-templates />\r
252     </em>\r
253   </xsl:template>\r
254 \r
255   <xsl:template match="tytul_dziela" >\r
256     <em class="book-title" xmlns="http://www.w3.org/1999/xhtml">\r
257       <xsl:if test="@typ = '1'" >„</xsl:if>\r
258       <xsl:apply-templates />\r
259       <xsl:if test="@typ = '1'">”</xsl:if>\r
260     </em>\r
261   </xsl:template>\r
262 \r
263   <xsl:template match="wyroznienie" >\r
264     <em class="author-emphasis" xmlns="http://www.w3.org/1999/xhtml">\r
265       <xsl:apply-templates />\r
266     </em>\r
267   </xsl:template>\r
268 \r
269   <xsl:template match="osoba" >\r
270     <em class="person" xmlns="http://www.w3.org/1999/xhtml">\r
271       <xsl:apply-templates />\r
272     </em>\r
273   </xsl:template>\r
274 \r
275   <xsl:template match="naglowek_listy"  >\r
276     <xsl:apply-templates />\r
277   </xsl:template>\r
278 \r
279   <xsl:template match="lista_osoba" >\r
280     <li xmlns="http://www.w3.org/1999/xhtml">\r
281       <xsl:apply-templates />\r
282     </li>\r
283   </xsl:template>\r
284 \r
285   <!--===========================================================-->\r
286   <!-- Tagi STANDALONE -->\r
287   <!--===========================================================-->\r
288 \r
289   <xsl:template match="sekcja_swiatlo">\r
290     <hr class="spacer" xmlns="http://www.w3.org/1999/xhtml"></hr>\r
291   </xsl:template>\r
292 \r
293   <xsl:template match="sekcja_asterysk">\r
294     <p class="spacer-asterisk" xmlns="http://www.w3.org/1999/xhtml">*</p>\r
295   </xsl:template>\r
296 \r
297   <xsl:template match="separator_linia">\r
298     <hr class="spacer-line" xmlns="http://www.w3.org/1999/xhtml"></hr>\r
299   </xsl:template>\r
300 \r
301   <!--===========================================================-->\r
302   <!-- Tagi SPECJALNE -->\r
303   <!--===========================================================-->\r
304 \r
305   <xsl:template match="motyw" />\r
306 \r
307   <!--===========================================================-->\r
308   <!-- Tagi IGNOROWANE -->\r
309   <!--===========================================================-->\r
310 \r
311   <xsl:template match="pe|pa|pr|pt" />\r
312 \r
313   <xsl:template match="extra" />\r
314 \r
315   <xsl:template match="pe|pa|pr|pt" >\r
316     <a id="anchor-{.}" class="anchor" href="annotations.html#annotation-{.}" \r
317        xmlns="http://www.w3.org/1999/xhtml">[<xsl:apply-templates />]</a>\r
318   </xsl:template>\r
319 \r
320   <xsl:template match="uwaga" />\r
321 \r
322   <!--pominięcie tych metadanych-->\r
323   <xsl:template match="rdf:RDF" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />\r
324 \r
325   <!--===========================================================-->\r
326   <!-- Tagi TEKSTOWE -->\r
327   <!--===========================================================-->\r
328 \r
329   <xsl:template match="text()"  >\r
330     <xsl:value-of select="." disable-output-escaping="yes"/>\r
331   </xsl:template>\r
332 \r
333   <xsl:template match="text()" >\r
334     <xsl:value-of select="." disable-output-escaping="yes"/>\r
335   </xsl:template>\r
336 \r
337 </xsl:stylesheet>