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