e8a5af61167c6837d55fce0f2e7726a8302c1db3
[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="naglowek_rozdzial">
141     <h2 class="h3" xmlns="http://www.w3.org/1999/xhtml">
142       <xsl:apply-templates />
143     </h2>
144   </xsl:template>
145
146   <xsl:template match="naglowek_osoba">
147     <h2 class="h4" xmlns="http://www.w3.org/1999/xhtml">
148       <xsl:apply-templates />
149     </h2>
150   </xsl:template>
151
152   <xsl:template match="miejsce_czas">
153     <div class="place-and-time" xmlns="http://www.w3.org/1999/xhtml">
154       <xsl:apply-templates />
155     </div>
156   </xsl:template>
157
158   <xsl:template match="didaskalia">
159     <div class="didaskalia" xmlns="http://www.w3.org/1999/xhtml">
160       <xsl:apply-templates />
161     </div>
162   </xsl:template>
163
164   <xsl:template match="akap|akap_dialog|akap_cd">
165     <p class="paragraph" xmlns="http://www.w3.org/1999/xhtml">
166       <xsl:apply-templates />
167     </p>
168   </xsl:template>
169
170   <xsl:template match="strofa">
171     <div class="stanza" xmlns="http://www.w3.org/1999/xhtml">
172       <xsl:apply-templates />
173     </div><div class='stanza-spacer' xmlns="http://www.w3.org/1999/xhtml">&#160;</div>
174   </xsl:template>
175
176   <xsl:template match="wers_normalny">
177     <div class="verse" xmlns="http://www.w3.org/1999/xhtml">
178       <xsl:apply-templates />
179     &#160;</div>
180   </xsl:template>
181
182   <xsl:template match="wers_akap">
183     <div class="verse" style="margin-left: 1em;" xmlns="http://www.w3.org/1999/xhtml">
184       <xsl:apply-templates />
185     &#160;</div>
186   </xsl:template>
187
188   <xsl:template match="wers_wciety">
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[@typ!='']">
195     <div class="verse" xmlns="http://www.w3.org/1999/xhtml">
196       <xsl:attribute name="style">
197           margin-left: <xsl:value-of select="@typ" />em;
198       </xsl:attribute>
199       <xsl:apply-templates />
200     &#160;</div>
201   </xsl:template>
202
203   <xsl:template match="wers_cd">
204     <div class="verse" style="margin-left: 12em;" xmlns="http://www.w3.org/1999/xhtml">
205       <xsl:apply-templates />
206     &#160;</div>
207   </xsl:template>
208
209   <xsl:template match="motto_podpis">
210     <div class="motto_podpis" xmlns="http://www.w3.org/1999/xhtml">
211       <xsl:apply-templates />
212     </div>
213   </xsl:template>
214
215   <!--===========================================================-->
216   <!-- Tagi LINIOWE -->
217   <!--===========================================================-->
218
219   <xsl:template match="slowo_obce">
220     <em class="foreign-word" xmlns="http://www.w3.org/1999/xhtml">
221       <xsl:apply-templates />
222     </em>
223   </xsl:template>
224
225   <xsl:template match="mat" >
226     <em class="math" xmlns="http://www.w3.org/1999/xhtml">
227       <xsl:apply-templates />
228     </em>
229   </xsl:template>
230
231   <xsl:template match="didask_tekst" >
232     <em class="didaskalia" xmlns="http://www.w3.org/1999/xhtml">
233       <xsl:apply-templates />
234     </em>
235   </xsl:template>
236
237   <xsl:template match="tytul_dziela" >
238     <em class="book-title" xmlns="http://www.w3.org/1999/xhtml">
239       <xsl:if test="@typ = '1'" >„</xsl:if>
240       <xsl:apply-templates />
241       <xsl:if test="@typ = '1'">”</xsl:if>
242     </em>
243   </xsl:template>
244
245   <xsl:template match="wyroznienie" >
246     <em class="author-emphasis" xmlns="http://www.w3.org/1999/xhtml">
247       <xsl:apply-templates />
248     </em>
249   </xsl:template>
250
251   <xsl:template match="osoba" >
252     <em class="person" xmlns="http://www.w3.org/1999/xhtml">
253       <xsl:apply-templates />
254     </em>
255   </xsl:template>
256
257   <xsl:template match="naglowek_listy"  >
258     <xsl:apply-templates />
259   </xsl:template>
260
261   <xsl:template match="lista_osoba" >
262     <li xmlns="http://www.w3.org/1999/xhtml">
263       <xsl:apply-templates />
264     </li>
265   </xsl:template>
266
267   <!--===========================================================-->
268   <!-- Tagi STANDALONE -->
269   <!--===========================================================-->
270
271   <xsl:template match="sekcja_swiatlo">
272     <p class="spacer" xmlns="http://www.w3.org/1999/xhtml">&#160;</p>
273   </xsl:template>
274
275   <xsl:template match="sekcja_asterysk">
276     <p class="spacer-asterisk" xmlns="http://www.w3.org/1999/xhtml">*</p>
277   </xsl:template>
278
279   <xsl:template match="separator_linia">
280     <hr class="spacer-line" xmlns="http://www.w3.org/1999/xhtml"></hr>
281   </xsl:template>
282
283   <!--===========================================================-->
284   <!-- Tagi SPECJALNE -->
285   <!--===========================================================-->
286
287   <xsl:template match="motyw" />
288
289   <!--===========================================================-->
290   <!-- Tagi IGNOROWANE -->
291   <!--===========================================================-->
292
293   <xsl:template match="extra" />
294
295   <xsl:template match="pe|pa|pr|pt" >
296     <a id="anchor-{.}" class="anchor" href="annotations.html#annotation-{.}"
297        xmlns="http://www.w3.org/1999/xhtml">[<xsl:apply-templates />]</a>
298   </xsl:template>
299
300   <xsl:template match="uwaga" />
301
302   <xsl:template match="nota_red" />
303
304   <!--pominięcie tych metadanych-->
305   <xsl:template match="rdf:RDF" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />
306
307   <!--===========================================================-->
308   <!-- Tagi TEKSTOWE -->
309   <!--===========================================================-->
310
311   <xsl:template match="text()"  >
312     <xsl:value-of select="." />
313   </xsl:template>
314
315   <xsl:template match="text()" >
316     <xsl:value-of select="." />
317   </xsl:template>
318
319 </xsl:stylesheet>