Revision 5360
Added by Jing Tao over 14 years ago
lib/style/skins/kepler/karxml.xsl | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<!-- |
|
3 |
* '$RCSfile$' |
|
4 |
* Authors: Matt Jones, CHad Berkley |
|
5 |
* Copyright: 2000 Regents of the University of California and the |
|
6 |
* National Center for Ecological Analysis and Synthesis |
|
7 |
* For Details: http://www.nceas.ucsb.edu/ |
|
8 |
* |
|
9 |
* '$Author: leinfelder $' |
|
10 |
* '$Date: 2008-06-17 13:16:32 -0700 (Tue, 17 Jun 2008) $' |
|
11 |
* '$Revision: 4006 $' |
|
12 |
* |
|
13 |
* This program is free software; you can redistribute it and/or modify |
|
14 |
* it under the terms of the GNU General Public License as published by |
|
15 |
* the Free Software Foundation; either version 2 of the License, or |
|
16 |
* (at your option) any later version. |
|
17 |
* |
|
18 |
* This program is distributed in the hope that it will be useful, |
|
19 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
20 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
21 |
* GNU General Public License for more details. |
|
22 |
* |
|
23 |
* You should have received a copy of the GNU General Public License |
|
24 |
* along with this program; if not, write to the Free Software |
|
25 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
26 |
* |
|
27 |
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to |
|
28 |
* convert an XML file showing the resultset of a query |
|
29 |
* into an HTML format suitable for rendering with modern web browsers. |
|
30 |
--> |
|
31 |
<xsl:stylesheet |
|
32 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
33 |
xmlns="http://www.w3.org/1999/xhtml" |
|
34 |
version="1.0"> |
|
35 |
|
|
36 |
<xsl:output method="xml" encoding="utf-8" |
|
37 |
doctype-public="-//W3C//DTD XHTML 1.1//EN" |
|
38 |
doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" |
|
39 |
indent="yes" /> |
|
40 |
|
|
41 |
<xsl:param name="sessid"/> |
|
42 |
<xsl:param name="qformat">default</xsl:param> |
|
43 |
<xsl:param name="enableediting">false</xsl:param> |
|
44 |
<xsl:param name="contextURL"/> |
|
45 |
<xsl:param name="httpServer"/> |
|
46 |
|
|
47 |
<xsl:template match="/"> |
|
48 |
<html xml:lang="en-US"> |
|
49 |
<head> |
|
50 |
<title><xsl:value-of select="//karEntry/karEntryXML/entity/@name"/></title> |
|
51 |
<link rel="stylesheet" type="text/css" |
|
52 |
href="{$contextURL}/style/skins/{$qformat}/{$qformat}.css" /> |
|
53 |
|
|
54 |
<style type="text/css"> |
|
55 |
<xsl:text disable-output-escaping="yes"> |
|
56 |
body, a, p, td, tr, h3, h2, h1 |
|
57 |
{ |
|
58 |
font-family: Arial, Helvetica, sans-serif; |
|
59 |
} |
|
60 |
|
|
61 |
body |
|
62 |
{ |
|
63 |
background: #ece9d8; |
|
64 |
margin: 0; |
|
65 |
} |
|
66 |
|
|
67 |
tr.top-level > td |
|
68 |
{ |
|
69 |
text-align: left; |
|
70 |
} |
|
71 |
|
|
72 |
tr.top-level > td |
|
73 |
{ |
|
74 |
background: white; |
|
75 |
border: 0.125em ridge white; |
|
76 |
padding: 0.375em; |
|
77 |
} |
|
78 |
|
|
79 |
td tr |
|
80 |
{ |
|
81 |
vertical-align: top; |
|
82 |
} |
|
83 |
|
|
84 |
td td |
|
85 |
{ |
|
86 |
padding: 0.1875em; |
|
87 |
} |
|
88 |
</xsl:text> |
|
89 |
</style> |
|
90 |
</head> |
|
91 |
|
|
92 |
<body> |
|
93 |
<table cellspacing="8" cellpadding="0" style="border: none; width: 100%;" class="main"> |
|
94 |
<colgroup></colgroup> |
|
95 |
<colgroup style="width: 75%;"></colgroup> |
|
96 |
<colgroup style="width: 25%;"></colgroup> |
|
97 |
|
|
98 |
<tr class="top-level"> |
|
99 |
<td colspan="2"> |
|
100 |
<h1> |
|
101 |
<span style="padding-right: 2em;"> |
|
102 |
<xsl:value-of select="//karEntry/karEntryXML/entity/@name"/> |
|
103 |
</span> |
|
104 |
|
|
105 |
<span style="font-size: smaller;"> |
|
106 |
<xsl:text> (</xsl:text> |
|
107 |
<xsl:value-of select="//karEntry/karEntryXML/entity/property[@name='class']/@value"/> |
|
108 |
<xsl:text>)</xsl:text> |
|
109 |
</span> |
|
110 |
</h1> |
|
111 |
</td> |
|
112 |
|
|
113 |
<td> |
|
114 |
<table cellspacing="0" cellpadding="0"> |
|
115 |
<xsl:if test="count(//karEntry/karEntryXML/entity/property[@name='author']) > 0"> |
|
116 |
<tr> |
|
117 |
<td style="font-style: italic;"> |
|
118 |
Author: |
|
119 |
</td> |
|
120 |
|
|
121 |
<td> |
|
122 |
<xsl:for-each select="//karEntry/karEntryXML/entity/property[@name='author']"> |
|
123 |
<xsl:if test="position() > 1"> |
|
124 |
<xsl:text>, </xsl:text> |
|
125 |
</xsl:if> |
|
126 |
|
|
127 |
<xsl:value-of select="configure"/> |
|
128 |
</xsl:for-each> |
|
129 |
</td> |
|
130 |
</tr> |
|
131 |
</xsl:if> |
|
132 |
|
|
133 |
<xsl:if test="count(//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[@name='version']) > 0"> |
|
134 |
<tr> |
|
135 |
<td style="font-style: italic;"> |
|
136 |
Version: |
|
137 |
</td> |
|
138 |
|
|
139 |
<td> |
|
140 |
<xsl:value-of select="//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[@name='version']/configure"/> |
|
141 |
</td> |
|
142 |
</tr> |
|
143 |
</xsl:if> |
|
144 |
</table> |
|
145 |
</td> |
|
146 |
</tr> |
|
147 |
|
|
148 |
<tr class="top-level" style="vertical-align: top;"> |
|
149 |
<td> |
|
150 |
<img alt="Actor Image"> |
|
151 |
<xsl:attribute name="src"> |
|
152 |
<xsl:text>metacat?qformat=</xsl:text> |
|
153 |
<xsl:value-of select="$qformat"/> |
|
154 |
<xsl:text>&sessionid=</xsl:text> |
|
155 |
<xsl:value-of select="$sessid"/> |
|
156 |
<xsl:text>&action=read&docid=</xsl:text> |
|
157 |
<!--xsl:value-of select="./docid"/--><xsl:text>PLASMA</xsl:text> |
|
158 |
</xsl:attribute> |
|
159 |
</img> |
|
160 |
|
|
161 |
<div style="text-align: center;"> |
|
162 |
<a> |
|
163 |
<xsl:attribute name="href"><xsl:value-of select="$httpServer"/>/authority/data?lsid=<xsl:value-of select="/entity/property[@name='karId']/@value"/></xsl:attribute> |
|
164 |
<xsl:text>Download</xsl:text> |
|
165 |
</a> |
|
166 |
</div> |
|
167 |
</td> |
|
168 |
|
|
169 |
<td colspan="2"> |
|
170 |
<!-- <xsl:value-of select="/entity/property[@name='KeplerDocumentation']/property[@name='description']/configure"/> --> |
|
171 |
|
|
172 |
<xsl:if test="count(//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[@name='userLevelDocumentation']/configure) > 0"> |
|
173 |
<p><xsl:value-of select="//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[@name='userLevelDocumentation']/configure"/></p> |
|
174 |
</xsl:if> |
|
175 |
</td> |
|
176 |
</tr> |
|
177 |
|
|
178 |
<tr class="top-level"> |
|
179 |
<td colspan="3"> |
|
180 |
<table cellspacing="0" cellpadding="0"> |
|
181 |
<xsl:if test="count(//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='prop:']) > 0"> |
|
182 |
<tr> |
|
183 |
<td colspan="2"> |
|
184 |
<h2>Parameters</h2> |
|
185 |
</td> |
|
186 |
</tr> |
|
187 |
|
|
188 |
<xsl:for-each select="//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='prop:']"> |
|
189 |
<tr> |
|
190 |
<td style="font-style: italic;"> |
|
191 |
<xsl:value-of select="substring(@name, 6)"/> |
|
192 |
</td> |
|
193 |
|
|
194 |
<td> |
|
195 |
<xsl:value-of select="configure"/> |
|
196 |
</td> |
|
197 |
</tr> |
|
198 |
</xsl:for-each> |
|
199 |
</xsl:if> |
|
200 |
|
|
201 |
<xsl:if test="count(//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='port:']) > 0"> |
|
202 |
<tr> |
|
203 |
<td colspan="2"> |
|
204 |
<h2>Ports</h2> |
|
205 |
</td> |
|
206 |
</tr> |
|
207 |
|
|
208 |
<xsl:for-each select="//karEntry/karEntryXML/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='port:']"> |
|
209 |
<tr> |
|
210 |
<td style="font-style: italic;"> |
|
211 |
<xsl:value-of select="substring(@name, 6)"/> |
|
212 |
</td> |
|
213 |
|
|
214 |
<td> |
|
215 |
<xsl:value-of select="configure"/> |
|
216 |
</td> |
|
217 |
</tr> |
|
218 |
</xsl:for-each> |
|
219 |
</xsl:if> |
|
220 |
</table> |
|
221 |
</td> |
|
222 |
</tr> |
|
223 |
</table> |
|
224 |
</body> |
|
225 |
</html> |
|
226 |
</xsl:template> |
|
227 |
</xsl:stylesheet> |
|
228 |
|
|
0 | 229 |
Also available in: Unified diff
Add a style sheet to transform kar xml document.