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