comparison xslt/books.xslt @ 170:cd2698ea00ab

Added generated XSLTs.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 02 Nov 2011 19:31:11 +0000
parents
children 1507ec5ba69a
comparison
equal deleted inserted replaced
169:b7b160e4e046 170:cd2698ea00ab
1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
4 <xsl:output indent="no" version="4.0" encoding="utf-8" method="html"/>
5
6 <xsl:strip-space elements="*"/>
7
8 <xsl:param select="'../xml'" name="XML"/>
9
10 <xsl:param name="YEAR"/>
11
12 <xsl:variable select="/article/@link" name="LINK"/>
13
14 <xsl:include href="dirname.xslt"/>
15
16 <xsl:include href="link.xslt"/>
17
18 <xsl:include href="style.xslt"/>
19
20 <xsl:include href="body.xslt"/>
21
22 <xsl:include href="menu.xslt"/>
23
24 <xsl:include href="content.xslt"/>
25
26 <xsl:template match="/article">
27
28 <html>
29 <head>
30
31 <title>
32 <xsl:value-of select="@name"/>
33 </title>
34
35 <xsl:call-template name="style">
36 <xsl:with-param select="@lang" name="lang"/>
37 </xsl:call-template>
38
39 </head>
40
41 <xsl:call-template name="body">
42 <xsl:with-param select="@lang" name="lang"/>
43 </xsl:call-template>
44
45 </html>
46 </xsl:template>
47
48 <xsl:template match="book">
49
50 <table>
51 <tr>
52
53 <td bgcolor="#EEEEEE">
54
55 <a href="{@link}">
56
57 <img src="{@cover}" alt="" style="padding: 2pt;" border="0"/>
58
59 </a>
60
61 </td>
62
63 <td>
64
65 <xsl:text>title: </xsl:text>
66 <a href="{@link}">
67 <xsl:value-of select="@title"/>
68 </a>
69 <br/>
70
71 <xsl:text>author: </xsl:text>
72 <xsl:choose>
73
74 <xsl:when test="@site">
75 <a href="{@site}">
76 <xsl:value-of select="@author"/>
77 </a>
78 </xsl:when>
79 <xsl:otherwise>
80 <xsl:value-of select="@author"/>
81 </xsl:otherwise>
82 </xsl:choose>
83 <br/>
84
85 <xsl:if test="@translator">
86 <xsl:text>translator: </xsl:text>
87 <xsl:value-of select="@translator"/>
88 <br/>
89 </xsl:if>
90
91 <xsl:if test="@publisher">
92 <xsl:text>publisher: </xsl:text>
93 <xsl:value-of select="@publisher"/>
94 <br/>
95 </xsl:if>
96
97 <xsl:text>language: </xsl:text>
98 <xsl:value-of select="@lang"/>
99
100 </td>
101
102 </tr>
103 </table>
104 </xsl:template>
105
106 </xsl:stylesheet>