-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheclipselink_nova.xsl
191 lines (171 loc) · 4.32 KB
/
eclipselink_nova.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/sections">
<div id="midcolumn">
<xsl:apply-templates select="section[@class='title']"
mode="title" />
<xsl:apply-templates select="section[@class='main']"
mode="main" />
<xsl:apply-templates select="section[@class='none']"
mode="none" />
</div>
<div id="rightcolumn">
<xsl:apply-templates select="section[@class='sideitem']"
mode="sideitem" />
</div>
</xsl:template>
<xsl:template match="section" mode="none">
<xsl:if test="@anchor">
<a>
<xsl:attribute name="name">
<xsl:value-of select="@anchor" />
</xsl:attribute>
</a>
</xsl:if>
<xsl:apply-templates select="description" mode="body" />
<ul>
<xsl:apply-templates />
</ul>
</xsl:template>
<xsl:template match="section" mode="title">
<div class="homeitem">
<xsl:if test="@anchor">
<a>
<xsl:attribute name="name">
<xsl:value-of select="@anchor" />
</xsl:attribute>
</a>
</xsl:if>
<h1>
<xsl:value-of select="@name" />
</h1>
<xsl:apply-templates select="description" mode="body" />
</div>
</xsl:template>
<xsl:template match="section" mode="main">
<div class="homeitem3col">
<xsl:if test="@anchor">
<a>
<xsl:attribute name="name">
<xsl:value-of select="@anchor" />
</xsl:attribute>
</a>
</xsl:if>
<h3>
<xsl:if test="@image">
<img width="40">
<xsl:attribute name="src">
<xsl:value-of select="@image" />
</xsl:attribute>
</img>
</xsl:if>
<xsl:value-of select="@name" />
</h3>
<xsl:apply-templates select="description" mode="body" />
<ul>
<xsl:apply-templates />
</ul>
</div>
</xsl:template>
<xsl:template match="section" mode="sideitem">
<div class='sideitem' style="text-align:center">
<xsl:apply-templates select="description" mode="body" />
<xsl:apply-templates />
<!--
<p />
<h6 style="text-align:center">
<a href="http://wiki.eclipse.org/EclipseLink">
Search Wiki
</a>
<br />
<form action="http://www.google.com/cse" id="cse-search-box">
<input type="hidden" name="cx" value="002128250543942842320:qffgtrd2s3k" />
<input type="text" name="q" size="25" maxlength="2048" />
<input type="image" name="sa" alt="Search"
src="http://dev.eclipse.org/custom_icons/system-search-bw.png" />
</form>
</h6>
-->
</div>
</xsl:template>
<xsl:template match="section">
<li>
<xsl:choose>
<xsl:when test="@name and @link">
<a>
<xsl:attribute name="href">
<xsl:value-of select="@link" />
</xsl:attribute>
<xsl:value-of select="@name" />
</a>
<br />
</xsl:when>
<xsl:otherwise>
<xsl:if test="@name">
<div class="sectiontitle">
<xsl:value-of select="@name" />
</div>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@image">
<span class="sectionimage">
<img>
<xsl:attribute name="src">
<xsl:value-of select="@image" />
</xsl:attribute>
</img>
</span>
<xsl:apply-templates mode="body" />
<div class="clearall" />
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates mode="body" />
</xsl:otherwise>
</xsl:choose>
</li>
</xsl:template>
<xsl:template match="item">
<xsl:choose>
<xsl:when test="@link and @title">
<li>
<a>
<xsl:attribute name="href">
<xsl:value-of select="@link" />
</xsl:attribute>
<xsl:value-of select="@title" />
</a>
<xsl:if test="*|text()">
<br />
<xsl:apply-templates mode="body" />
</xsl:if>
</li>
</xsl:when>
<xsl:otherwise>
<xsl:if test="@title">
<div class="infoboxsubtitle">
<xsl:value-of select="@title" />
</div>
</xsl:if>
<xsl:if test="*|text()">
<li>
<xsl:apply-templates mode="body" />
</li>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="description" mode="body">
<p>
<xsl:apply-templates mode="body" />
</p>
</xsl:template>
<xsl:template match="*|@*|text()" mode="body">
<xsl:copy>
<xsl:apply-templates select="*|@*|text()" mode="body" />
</xsl:copy>
</xsl:template>
<xsl:template match="*|@*|text()" />
</xsl:stylesheet>