-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.xsl
149 lines (129 loc) · 4.01 KB
/
default.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
indent="yes"
method="html"
doctype-public="XSLT-compat"
encoding="UTF-8"
/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="page">
<html>
<head>
<title><xsl:value-of select="@title"/></title>
<link rel="stylesheet" href="default.css" type="text/css" />
<link rel="icon" href="images/favicon.png" type="image/png" />
</head>
<body>
<h1 align="center"><img src="images/logo.png" alt="Construo"/></h1>
<div id="nav">
<ul>
<li><a href="index.html">Construo</a></li>
<li><a href="tutorial.html">Tutorial</a></li>
</ul>
</div>
<div id="body">
<xsl:apply-templates/>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="logo">
<h1 align="center"><img src="images/logo.png" alt="Construo"/></h1>
</xsl:template>
<xsl:template match="link">
<a href="{@ref}"><xsl:apply-templates/></a>
</xsl:template>
<xsl:template match="linkbar">
Linkbar<br/>
<xsl:for-each select="/section">
..:: <xsl:value-of select="."/> ::..
</xsl:for-each>
</xsl:template>
<xsl:template match="news">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="news/item">
<dt><strong><xsl:value-of select="@date"/></strong></dt>
<dd><xsl:apply-templates/></dd>
</xsl:template>
<xsl:template match="section-toc">
<dl style="toc">
<xsl:for-each select="following-sibling::section">
<dt><a href="#{generate-id()}"><xsl:value-of select="@title" /></a></dt>
<dd>
<dl>
<xsl:for-each select="child::subsection">
<dt><a href="#{generate-id()}"><xsl:value-of select="@title" /></a></dt>
<dd>
<dl>
<xsl:for-each select="child::subsubsection">
<dt><a href="#{generate-id()}"><xsl:value-of select="@title" /></a></dt>
</xsl:for-each>
</dl>
</dd>
</xsl:for-each>
</dl>
</dd>
</xsl:for-each>
</dl>
</xsl:template>
<xsl:template match="section">
<div class="section">
<h2 id="{generate-id()}"><xsl:value-of select="@title"/></h2>
<div class="sectionbody">
<xsl:apply-templates/>
</div>
</div>
</xsl:template>
<xsl:template match="subsection">
<h3 id="{generate-id()}"><xsl:value-of select="@title"/></h3>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="subsubsection">
<h4 id="{generate-id()}"><xsl:value-of select="@title"/></h4>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="downloads">
<ul>
<xsl:apply-templates/>
</ul>
</xsl:template>
<xsl:template match="downloads/item">
<xsl:choose>
<xsl:when test=".=''">
<li><a href="http://savannah.nongnu.org/download/construo/{@file}"><xsl:value-of select="@file"/></a></li>
</xsl:when>
<xsl:otherwise>
<li><a href="http://savannah.nongnu.org/download/construo/{@file}">
<xsl:value-of select="@file"/></a>
-
<xsl:apply-templates/>
</li>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="screenshots">
<div class="screenshots">
<ul>
<xsl:apply-templates/>
</ul>
</div>
</xsl:template>
<xsl:template match="screenshots/item">
<li><a href="images/{.}.png"><img src="images/{.}_small.png"/></a></li>
</xsl:template>
<xsl:template match="copyright">
<div id="footer">
<p>
Copyright (c) 2001 <A HREF="http://pingus.seul.org/~grumbel/">Ingo Ruhnke</A> <A HREF="mailto:[email protected]?subject=[Construo]"><[email protected]></A><BR/>
Last update: 2010-05-30
</p>
</div>
</xsl:template>
</xsl:stylesheet>