forked from RuleML/ruleml-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
homepage-preconditional.xsl
139 lines (108 loc) · 3.7 KB
/
homepage-preconditional.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
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Started by Michael Sintek, developed by Harold Boley "{sintek,boley}@dfki.de", modified by Elina Hotman -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="slixhtml.xsl"/>
<xsl:template match="homepage">
<xsl:processing-instruction name="cocoon-format">type="text/html"</xsl:processing-instruction>
<html>
<head>
<title>
<xsl:value-of select="//title"/>
</title>
<style type="text/css">
h1 { font-size: 32pt; font-weight: bold }
h2 { font-size: 16pt; font-weight: bold }
ul { line-height: 120% }
ol { line-height: 120% }
p { line-height: 100% }
</style>
</head>
<body bgcolor="#EEEEEE">
<!-- <body background="hintergrund.gif" bgcolor="#FFFFFF"> -->
<xsl:apply-templates select="opening"/>
<table border="0" width="100%" cellspacing="7" cellpadding="0" align="center" >
<tr>
<td valign="TOP" width="30%" bgcolor="#FFFFFF"></td>
<td valign="TOP" width="40%" bgcolor="#FFFFFF">
<!-- <div align="center"><img src="img/logo.jpg" alt="logo" border="0" height="42" width="320" align="BOTTOM"/>
</div> -->
</td>
<td valign="TOP" width="30%" bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td valign="TOP" width="30%" bgcolor="#FFCCCC">
<h2>Contents</h2>
<ul>
<xsl:apply-templates select="section" mode="toc"/>
</ul>
</td>
<td valign="TOP" width="40%" align="left">
<xsl:apply-templates select="news"/>
</td>
<td valign="TOP" width="30%" bgcolor="#CCCCFF">
<xsl:apply-templates select="mission"/>
</td>
</tr>
</table>
<xsl:apply-templates select="section" mode="full"/>
<br/>
<xsl:apply-templates select="closing"/>
</body>
</html>
</xsl:template>
<xsl:template match="opening">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="closing">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="news">
<h2><xsl:apply-templates select="header" mode="header"/></h2>
<xsl:apply-templates select="itemize" mode="reverse"/>
</xsl:template>
<xsl:template match="mission">
<h2><xsl:apply-templates select="header" mode="header"/></h2>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="section" mode="toc">
<li>
<a>
<xsl:attribute name="href">#<xsl:choose><xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when><xsl:otherwise><xsl:value-of select="header"/></xsl:otherwise></xsl:choose></xsl:attribute>
<xsl:apply-templates select="header" mode="header"/>
</a>
</li>
</xsl:template>
<xsl:template match="section" mode="full">
<h2>
<a>
<xsl:attribute name="name"><xsl:choose><xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when><xsl:otherwise><xsl:value-of select="header"/></xsl:otherwise></xsl:choose></xsl:attribute>
<xsl:apply-templates select="header" mode="header"/>
</a>
</h2>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="title" mode="title">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="title">
</xsl:template>
<xsl:template match="header" mode="header">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="header">
</xsl:template>
<xsl:template match="box[@bgcolor]">
<table border="1" cellpadding="5" bgcolor="{@bgcolor}">
<tr><td>
<xsl:apply-templates/>
</td></tr>
</table>
</xsl:template>
<xsl:template match="box">
<table border="1" cellpadding="5" bgcolor="#EEFFEE">
<tr><td>
<xsl:apply-templates/>
</td></tr>
</table>
</xsl:template>
</xsl:stylesheet>