New EPUB builder, other minor changes.
[librarian.git] / src / 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
5   <xsl:template match="/">
6     <html xmlns="http://www.w3.org/1999/xhtml">
7       <head>
8         <link rel="stylesheet" href="style.css" type="text/css" />
9         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10         <title>
11           <xsl:text>Przypisy</xsl:text>
12         </title>
13       </head>
14       <body>
15         <div id="book-text" xmlns="http://www.w3.org/1999/xhtml">
16           <div id="footnotes" xmlns="http://www.w3.org/1999/xhtml">
17             <h2 xmlns="http://www.w3.org/1999/xhtml">
18               <xsl:text>Przypisy:</xsl:text>
19             </h2>
20             <xsl:apply-templates mode="przypis" />
21           </div>
22         </div>
23       </body>
24     </html>
25   </xsl:template>
26
27   <xsl:template match="text()" >
28     <xsl:value-of select="." />
29   </xsl:template>
30
31   <xsl:template match="pa|pe|pr|pt" mode="przypis">
32     <p class="annotation" id="annotation-{@number}" xmlns="http://www.w3.org/1999/xhtml"><a href="part{@part}.xhtml#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>
33     <xsl:text>&#xa;</xsl:text>
34   </xsl:template>
35
36   <xsl:template match="slowo_obce">
37     <em class="foreign-word" xmlns="http://www.w3.org/1999/xhtml">
38       <xsl:apply-templates select="text()" />
39     </em>
40   </xsl:template>
41
42   <xsl:template match="akap|akap_cd">
43     <p class="paragraph" xmlns="http://www.w3.org/1999/xhtml">
44       <xsl:apply-templates />
45     </p>
46   </xsl:template>
47
48   <xsl:template match="strofa">
49     <div class="stanza" xmlns="http://www.w3.org/1999/xhtml">
50       <xsl:apply-templates />
51     </div>
52   </xsl:template>
53
54   <xsl:template match="tytul_dziela" >
55     <em class="book-title" xmlns="http://www.w3.org/1999/xhtml">
56       <xsl:if test="@typ = '1'" >„</xsl:if>
57       <xsl:apply-templates />
58       <xsl:if test="@typ = '1'">”</xsl:if>
59     </em>
60   </xsl:template>
61
62   <xsl:template match="wers_normalny">
63     <p class="verse" xmlns="http://www.w3.org/1999/xhtml">
64       <xsl:apply-templates />
65     </p>
66   </xsl:template>
67
68 </xsl:stylesheet>