Project

General

Profile

1 3178 sledge
<?xml version="1.0" encoding="UTF-8"?>
2 2951 berkley
<!--
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$'
10
*     '$Date$'
11
* '$Revision$'
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 3178 sledge
<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 2951 berkley
36 3178 sledge
  <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 2951 berkley
  <xsl:param name="sessid"/>
42
  <xsl:param name="qformat">default</xsl:param>
43
  <xsl:param name="enableediting">false</xsl:param>
44 3178 sledge
45 2951 berkley
  <xsl:template match="/">
46 3178 sledge
    <html xml:lang="en-US">
47
      <head>
48
        <title><xsl:value-of select="/entity/@name"/></title>
49
        <link rel="stylesheet" type="text/css"
50 3780 daigle
            href="{$contextURL}/style/skins/{$qformat}/{$qformat}.css" />
51 3178 sledge
52
        <style type="text/css">
53
          <xsl:text disable-output-escaping="yes">
54
body, a, p, td, tr, h3, h2, h1
55
{
56
    font-family: Arial, Helvetica, sans-serif;
57
}
58
59
body
60
{
61
    background: #ece9d8;
62
    margin: 0;
63
}
64
65
tr.top-level > td
66
{
67
    text-align: left;
68
}
69
70
tr.top-level > td
71
{
72
    background: white;
73
    border: 0.125em ridge white;
74
    padding: 0.375em;
75
}
76
77
td tr
78
{
79
    vertical-align: top;
80
}
81
82
td td
83
{
84
    padding: 0.1875em;
85
}
86
</xsl:text>
87
        </style>
88 2954 berkley
      </head>
89 3178 sledge
90
      <body>
91
        <table cellspacing="8" cellpadding="0" style="border: none; width: 100%;" class="main">
92
          <colgroup></colgroup>
93 3204 sledge
          <colgroup style="width: 75%;"></colgroup>
94
          <colgroup style="width: 25%;"></colgroup>
95 3178 sledge
96
          <tr class="top-level">
97
            <td colspan="2">
98
              <h1>
99
                <span style="padding-right: 2em;">
100
                  <xsl:value-of select="/entity/@name"/>
101
                </span>
102
103 3204 sledge
                <span style="font-size: smaller;">
104
                  <xsl:text> (</xsl:text>
105
                  <xsl:value-of select="/entity/property[@name='class']/@value"/>
106
                  <xsl:text>)</xsl:text>
107
                </span>
108 3178 sledge
              </h1>
109
            </td>
110
111 3204 sledge
            <td>
112 3178 sledge
              <table cellspacing="0" cellpadding="0">
113 3286 berkley
                <xsl:if test="count(/entity/property[@name='KeplerDocumentation']/property[@name='author']) &gt; 0">
114 3178 sledge
                  <tr>
115
                    <td style="font-style: italic;">
116
                      Author:
117
                    </td>
118
119
                    <td>
120 3286 berkley
                      <xsl:for-each select="/entity/property[@name='KeplerDocumentation']/property[@name='author']">
121 3179 sledge
                        <xsl:if test="position() &gt; 1">
122 3178 sledge
                          <xsl:text>, </xsl:text>
123
                        </xsl:if>
124
125
                        <xsl:value-of select="configure"/>
126
                      </xsl:for-each>
127
                    </td>
128
                  </tr>
129
                </xsl:if>
130
131 3286 berkley
                <xsl:if test="count(/entity/property[@name='KeplerDocumentation']/property[@name='version']) &gt; 0">
132 3178 sledge
                  <tr>
133
                    <td style="font-style: italic;">
134
                      Version:
135
                    </td>
136
137
                    <td>
138 3286 berkley
                      <xsl:value-of select="/entity/property[@name='KeplerDocumentation']/property[@name='version']/configure"/>
139 3178 sledge
                    </td>
140
                  </tr>
141
                </xsl:if>
142
              </table>
143
            </td>
144
          </tr>
145
146
          <tr class="top-level" style="vertical-align: top;">
147
            <td>
148
              <img alt="Actor Image">
149
                <xsl:attribute name="src">
150
                  <xsl:text>metacat?qformat=</xsl:text>
151
                  <xsl:value-of select="$qformat"/>
152
                  <xsl:text>&amp;sessionid=</xsl:text>
153
                  <xsl:value-of select="$sessid"/>
154
                  <xsl:text>&amp;action=read&amp;docid=</xsl:text>
155
                  <!--xsl:value-of select="./docid"/--><xsl:text>PLASMA</xsl:text>
156
                </xsl:attribute>
157
              </img>
158
159
              <div style="text-align: center;">
160
                <a>
161 3389 tao
                  <xsl:attribute name="href">http://@httpserver@/authority/data?lsid=<xsl:value-of select="/entity/property[@name='karId']/@value"/></xsl:attribute>
162 3178 sledge
                  <xsl:text>Download</xsl:text>
163
                </a>
164
              </div>
165
            </td>
166
167
            <td colspan="2">
168 3286 berkley
              <!-- <xsl:value-of select="/entity/property[@name='KeplerDocumentation']/property[@name='description']/configure"/> -->
169 3178 sledge
170 3286 berkley
              <xsl:if test="count(/entity/property[@name='KeplerDocumentation']/property[@name='userLevelDocumentation']/configure) &gt; 0">
171
                <p><xsl:value-of select="/entity/property[@name='KeplerDocumentation']/property[@name='userLevelDocumentation']/configure"/></p>
172 3178 sledge
              </xsl:if>
173
            </td>
174
          </tr>
175
176
          <tr class="top-level">
177
            <td colspan="3">
178
              <table cellspacing="0" cellpadding="0">
179 3286 berkley
                <xsl:if test="count(/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='prop:']) &gt; 0">
180 3178 sledge
                  <tr>
181
                    <td colspan="2">
182
                      <h2>Parameters</h2>
183
                    </td>
184
                  </tr>
185
186 3286 berkley
                  <xsl:for-each select="/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='prop:']">
187 3178 sledge
                    <tr>
188
                      <td style="font-style: italic;">
189 3179 sledge
                        <xsl:value-of select="substring(@name, 6)"/>
190 3178 sledge
                      </td>
191
192
                      <td>
193
                        <xsl:value-of select="configure"/>
194
                      </td>
195
                    </tr>
196
                  </xsl:for-each>
197
                </xsl:if>
198
199 3286 berkley
                <xsl:if test="count(/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='port:']) &gt; 0">
200 3178 sledge
                  <tr>
201
                    <td colspan="2">
202
                      <h2>Ports</h2>
203
                    </td>
204
                  </tr>
205
206 3286 berkley
                  <xsl:for-each select="/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='port:']">
207 3178 sledge
                    <tr>
208
                      <td style="font-style: italic;">
209 3179 sledge
                        <xsl:value-of select="substring(@name, 6)"/>
210 3178 sledge
                      </td>
211
212
                      <td>
213
                        <xsl:value-of select="configure"/>
214
                      </td>
215
                    </tr>
216
                  </xsl:for-each>
217
                </xsl:if>
218
              </table>
219
            </td>
220
          </tr>
221
        </table>
222
      </body>
223 2951 berkley
    </html>
224 3178 sledge
  </xsl:template>
225
</xsl:stylesheet>