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 4006 leinfelder
  <xsl:param name="contextURL"/>
45
  <xsl:param name="httpServer"/>
46 3178 sledge
47 2951 berkley
  <xsl:template match="/">
48 3178 sledge
    <html xml:lang="en-US">
49
      <head>
50
        <title><xsl:value-of select="/entity/@name"/></title>
51
        <link rel="stylesheet" type="text/css"
52 3780 daigle
            href="{$contextURL}/style/skins/{$qformat}/{$qformat}.css" />
53 3178 sledge
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 2954 berkley
      </head>
91 3178 sledge
92
      <body>
93
        <table cellspacing="8" cellpadding="0" style="border: none; width: 100%;" class="main">
94
          <colgroup></colgroup>
95 3204 sledge
          <colgroup style="width: 75%;"></colgroup>
96
          <colgroup style="width: 25%;"></colgroup>
97 3178 sledge
98
          <tr class="top-level">
99
            <td colspan="2">
100
              <h1>
101
                <span style="padding-right: 2em;">
102
                  <xsl:value-of select="/entity/@name"/>
103
                </span>
104
105 3204 sledge
                <span style="font-size: smaller;">
106
                  <xsl:text> (</xsl:text>
107
                  <xsl:value-of select="/entity/property[@name='class']/@value"/>
108
                  <xsl:text>)</xsl:text>
109
                </span>
110 3178 sledge
              </h1>
111
            </td>
112
113 3204 sledge
            <td>
114 3178 sledge
              <table cellspacing="0" cellpadding="0">
115 3286 berkley
                <xsl:if test="count(/entity/property[@name='KeplerDocumentation']/property[@name='author']) &gt; 0">
116 3178 sledge
                  <tr>
117
                    <td style="font-style: italic;">
118
                      Author:
119
                    </td>
120
121
                    <td>
122 3286 berkley
                      <xsl:for-each select="/entity/property[@name='KeplerDocumentation']/property[@name='author']">
123 3179 sledge
                        <xsl:if test="position() &gt; 1">
124 3178 sledge
                          <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 3286 berkley
                <xsl:if test="count(/entity/property[@name='KeplerDocumentation']/property[@name='version']) &gt; 0">
134 3178 sledge
                  <tr>
135
                    <td style="font-style: italic;">
136
                      Version:
137
                    </td>
138
139
                    <td>
140 3286 berkley
                      <xsl:value-of select="/entity/property[@name='KeplerDocumentation']/property[@name='version']/configure"/>
141 3178 sledge
                    </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>&amp;sessionid=</xsl:text>
155
                  <xsl:value-of select="$sessid"/>
156
                  <xsl:text>&amp;action=read&amp;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 4006 leinfelder
                  <xsl:attribute name="href"><xsl:value-of select="$httpServer"/>/authority/data?lsid=<xsl:value-of select="/entity/property[@name='karId']/@value"/></xsl:attribute>
164 3178 sledge
                  <xsl:text>Download</xsl:text>
165
                </a>
166
              </div>
167
            </td>
168
169
            <td colspan="2">
170 3286 berkley
              <!-- <xsl:value-of select="/entity/property[@name='KeplerDocumentation']/property[@name='description']/configure"/> -->
171 3178 sledge
172 3286 berkley
              <xsl:if test="count(/entity/property[@name='KeplerDocumentation']/property[@name='userLevelDocumentation']/configure) &gt; 0">
173
                <p><xsl:value-of select="/entity/property[@name='KeplerDocumentation']/property[@name='userLevelDocumentation']/configure"/></p>
174 3178 sledge
              </xsl:if>
175
            </td>
176
          </tr>
177
178
          <tr class="top-level">
179
            <td colspan="3">
180
              <table cellspacing="0" cellpadding="0">
181 3286 berkley
                <xsl:if test="count(/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='prop:']) &gt; 0">
182 3178 sledge
                  <tr>
183
                    <td colspan="2">
184
                      <h2>Parameters</h2>
185
                    </td>
186
                  </tr>
187
188 3286 berkley
                  <xsl:for-each select="/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='prop:']">
189 3178 sledge
                    <tr>
190
                      <td style="font-style: italic;">
191 3179 sledge
                        <xsl:value-of select="substring(@name, 6)"/>
192 3178 sledge
                      </td>
193
194
                      <td>
195
                        <xsl:value-of select="configure"/>
196
                      </td>
197
                    </tr>
198
                  </xsl:for-each>
199
                </xsl:if>
200
201 3286 berkley
                <xsl:if test="count(/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='port:']) &gt; 0">
202 3178 sledge
                  <tr>
203
                    <td colspan="2">
204
                      <h2>Ports</h2>
205
                    </td>
206
                  </tr>
207
208 3286 berkley
                  <xsl:for-each select="/entity/property[@name='KeplerDocumentation']/property[substring(@name, 1, 5)='port:']">
209 3178 sledge
                    <tr>
210
                      <td style="font-style: italic;">
211 3179 sledge
                        <xsl:value-of select="substring(@name, 6)"/>
212 3178 sledge
                      </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 2951 berkley
    </html>
226 3178 sledge
  </xsl:template>
227
</xsl:stylesheet>