Version bump.
[librarian.git] / librarian / epub / xsltAnnotations.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     <html xmlns="http://www.w3.org/1999/xhtml">
9       <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           <xsl:text>Przypisy</xsl:text>
14         </title>
15       </head>
16       <body>
17         <div id="book-text" xmlns="http://www.w3.org/1999/xhtml">
18           <div id="footnotes" xmlns="http://www.w3.org/1999/xhtml">
19             <h2 xmlns="http://www.w3.org/1999/xhtml">
20               Przypisy:
21             </h2>
22             <xsl:apply-templates mode="przypis" />
23           </div>
24         </div>
25       </body>
26     </html>
27   </xsl:template>
28
29   <xsl:template match="text()" >
30     <xsl:value-of select="." />
31   </xsl:template>
32
33   <xsl:template match="pa|pe|pr|pt" mode="przypis">
34     <p id="annotation-{@number}" class="annotation" xmlns="http://www.w3.org/1999/xhtml"><a href="part{@part}.html#anchor-{@number}" xmlns="http://www.w3.org/1999/xhtml"><xsl:value-of select="@number" /></a>. <xsl:apply-templates /><xsl:if test="name()='pa'"> [przypis autorski]</xsl:if><xsl:if test="name()='pt'"> [przypis tłumacza]</xsl:if><xsl:if test="name()='pr'"> [przypis redakcyjny]</xsl:if><xsl:if test="name()='pe'"> [przypis edytorski]</xsl:if></p>
35     <xsl:text>&#xa;</xsl:text>
36   </xsl:template>
37
38   <xsl:template match="slowo_obce">
39     <em class="foreign-word" xmlns="http://www.w3.org/1999/xhtml">
40       <xsl:apply-templates select="text()" />
41     </em>
42   </xsl:template>
43
44   <xsl:template match="akap|akap_cd">
45     <p class="paragraph" xmlns="http://www.w3.org/1999/xhtml">
46       <xsl:apply-templates />
47     </p>
48   </xsl:template>
49
50   <xsl:template match="strofa">
51     <div class="stanza" xmlns="http://www.w3.org/1999/xhtml">
52       <xsl:apply-templates />
53     </div>
54   </xsl:template>
55
56   <xsl:template match="tytul_dziela" >
57     <em class="book-title" xmlns="http://www.w3.org/1999/xhtml">
58       <xsl:if test="@typ = '1'" >„</xsl:if>
59       <xsl:apply-templates />
60       <xsl:if test="@typ = '1'">”</xsl:if>
61     </em>
62   </xsl:template>
63
64   <xsl:template match="wers_normalny">
65     <p class="verse" xmlns="http://www.w3.org/1999/xhtml">
66       <xsl:apply-templates />
67     </p>
68   </xsl:template>
69
70 </xsl:stylesheet>