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