Project

General

Profile

1 553 tao
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Matt Jones
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 that is valid with respect to the eml-dataset.dtd
29
  * module of the Ecological Metadata Language (EML) into an HTML format
30
  * suitable for rendering with modern web browsers.
31
-->
32
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
33 1680 tao
  <xsl:import href="eml-access-2.0.0.xsl"/>
34
  <xsl:import href="eml-attribute-2.0.0.xsl"/>
35
  <xsl:import href="eml-attribute-enumeratedDomain-2.0.0.xsl"/>
36
  <xsl:import href="eml-constraint-2.0.0.xsl"/>
37
  <xsl:import href="eml-coverage-2.0.0.xsl"/>
38 553 tao
  <xsl:import href="eml-dataset-2.0.0.xsl"/>
39 1680 tao
  <xsl:import href="eml-datatable-2.0.0.xsl"/>
40
  <xsl:import href="eml-distribution-2.0.0.xsl"/>
41 1632 tao
  <xsl:import href="eml-entity-2.0.0.xsl"/>
42 1680 tao
  <xsl:import href="eml-identifier-2.0.0.xsl"/>
43
  <xsl:import href="eml-literature-2.0.0.xsl"/>
44
  <xsl:import href="eml-method-2.0.0.xsl"/>
45
  <xsl:import href="eml-otherentity-2.0.0.xsl"/>
46
  <xsl:import href="eml-party-2.0.0.xsl"/>
47 1632 tao
  <xsl:import href="eml-physical-2.0.0.xsl"/>
48 1680 tao
  <xsl:import href="eml-project-2.0.0.xsl"/>
49
  <xsl:import href="eml-protocol-2.0.0.xsl"/>
50
  <xsl:import href="eml-resource-2.0.0.xsl"/>
51
  <xsl:import href="eml-settings-2.0.0.xsl"/>
52
  <xsl:import href="eml-software-2.0.0.xsl"/>
53
  <xsl:import href="eml-spatialraster-2.0.0.xsl"/>
54
  <xsl:import href="eml-spatialvector-2.0.0.xsl"/>
55
  <xsl:import href="eml-storedprocedure-2.0.0.xsl"/>
56
  <xsl:import href="eml-text-2.0.0.xsl"/>
57
  <xsl:import href="eml-view-2.0.0.xsl"/>
58
59 553 tao
  <xsl:output method="html" encoding="iso-8859-1"/>
60
  <!-- global variables to store id node set in case to be referenced-->
61
  <xsl:variable name="ids" select="//*[@id!='']"/>
62
63
  <xsl:template match="/">
64
    <html>
65
      <head>
66
        <link rel="stylesheet" type="text/css"
67
              href="{$stylePath}/{$qformat}.css" />
68
      </head>
69
      <body>
70 1680 tao
          <table width="100%">
71
          <tr>
72
            <td rowspan="2"><img src="@web-base-url@/images/KNBLogo.gif"/></td>
73
            <td colspan="7"><div class="title">Biocomplexity Data Search</div>
74
            </td>
75
          </tr>
76
          <tr>
77
            <td><a href="@web-base-url@" class="toollink"> KNB </a></td>
78
            <td><a href="@web-base-url@/data.html" class="toollink">
79
                Data </a></td>
80
            <td><a href="@web-base-url@/people.html" class="toollink">
81
                People </a></td>
82
            <td><a href="@web-base-url@/informatics" class="toollink">
83
                Informatics </a></td>
84
            <td><a href="@web-base-url@/biodiversity" class="toollink">
85
                Biodiversity </a></td>
86
            <td><a href="@web-base-url@/education" class="toollink">
87
                Education </a></td>
88
            <td><a href="@web-base-url@/software" class="toollink">
89
                Software </a></td>
90
         </tr>
91
         <tr>
92
          <td align="right" valign="top" colspan="7">
93
            <form action="@html-path@/servlet/metacat" method="POST">
94
             Data Search: <input type="text" name="anyfield" size="10" />
95
             <input type="hidden" name="action" value="query" />
96
             <input type="hidden" name="qformat" value="knb" />
97
             <input type="hidden" name="operator" value="UNION" />
98
99
             <input type="hidden" name="returnfield"
100
              value="creator/individualName/surName" />
101
             <input type="hidden" name="returnfield"
102
              value="creator/organizationName" />
103
             <input type="hidden" name="returnfield"
104
              value="originator/individualName/surName" />
105
             <input type="hidden" name="returnfield"
106
              value="originator/individualName/givenName" />
107
             <input type="hidden" name="returnfield"
108
              value="originator/organizationName" />
109
             <input type="hidden" name="returnfield"
110
              value="title" />
111
             <input type="hidden" name="returnfield"
112
              value="keyword" />
113
             <input type="hidden" name="returndoctype"
114
              value="eml://ecoinformatics.org/eml-2.0.0" />
115
             <input type="hidden" name="returndoctype"
116
              value="-//NCEAS//eml-dataset-2.0//EN" />
117
             <input type="hidden" name="returndoctype"
118
              value="-//NCEAS//resource//EN" />
119
             <input type="hidden" name="returndoctype"
120
              value="-//NCEAS//eml-dataset//EN" />
121
              <input type="hidden" name="returndoctype"
122
              value="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN" />
123
              <input type="hidden" name="returndoctype"
124
              value="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN" />
125
           </form>
126
          </td>
127
        </tr>
128
       </table>
129 553 tao
        <xsl:apply-templates select="*[local-name()='eml']"/>
130
      </body>
131
    </html>
132
   </xsl:template>
133
134
   <xsl:template match="*[local-name()='eml']">
135 1632 tao
       <xsl:for-each select="dataset">
136
         <xsl:call-template name="emldataset"/>
137
       </xsl:for-each>
138
       <xsl:for-each select="citation">
139
         <xsl:call-template name="emlcitation"/>
140
       </xsl:for-each>
141
       <xsl:for-each select="software">
142
         <xsl:call-template name="emlsoftware"/>
143
       </xsl:for-each>
144
       <xsl:for-each select="protocol">
145
         <xsl:call-template name="emlprotocol"/>
146
       </xsl:for-each>
147 553 tao
   </xsl:template>
148
149 1632 tao
   <!--********************************************************
150
                             dataset part
151
       ********************************************************-->
152
153
   <xsl:template name="emldataset">
154
      <table class="tabledefault" width="100%">
155 553 tao
          <xsl:if test="$displaymodule='dataset'">
156 1632 tao
             <xsl:call-template name="datasetpart"/>
157 553 tao
          </xsl:if>
158 1632 tao
          <xsl:if test="$displaymodule='entity'">
159
             <xsl:call-template name="entitypart"/>
160
          </xsl:if>
161
          <xsl:if test="$displaymodule='attribute'">
162
             <xsl:call-template name="attributepart"/>
163
          </xsl:if>
164
     </table>
165 553 tao
   </xsl:template>
166
167 1632 tao
   <!--*************** Data set part *************-->
168
   <xsl:template name="datasetpart">
169
      <tr><td>
170
         <center>
171 1661 tao
            <h3>Data Set Description</h3>
172
           </center>
173 1632 tao
      </td></tr>
174
      <tr>
175
          <td width="100%">
176
             <xsl:call-template name="identifier">
177
                <xsl:with-param name="packageID" select="../@packageId"/>
178
                <xsl:with-param name="system" select="../@system"/>
179
             </xsl:call-template>
180
          </td>
181
      </tr>
182
      <tr>
183
           <td width="100%">
184
              <xsl:apply-templates select="." mode="dataset"/>
185
           </td>
186
      </tr>
187
   </xsl:template>
188
189
   <!--************ Entity part *****************-->
190
    <xsl:template name="entitypart">
191
      <tr><td>
192
         <center>
193 1661 tao
            <h3>Entity Description</h3>
194
           </center>
195 1632 tao
      </td></tr>
196
      <tr>
197
          <td width="100%">
198
             <xsl:call-template name="identifier">
199
                <xsl:with-param name="packageID" select="../@packageId"/>
200
                <xsl:with-param name="system" select="../@system"/>
201
             </xsl:call-template>
202
          </td>
203
      </tr>
204
      <tr>
205
           <td width="100%">
206
             <!-- find the subtree to process -->
207
             <xsl:if test="$entitytype='dataTable'">
208
               <xsl:for-each select="dataTable">
209
                  <xsl:if test="position()=$entityindex">
210
                     <xsl:call-template name="dataTable">
211
                         <xsl:with-param name="datatablefirstColStyle" select="$firstColStyle"/>
212
                         <xsl:with-param name="datatablesubHeaderStyle" select="$subHeaderStyle"/>
213
                         <xsl:with-param name="docid" select="$docid"/>
214
                         <xsl:with-param name="entitytype" select="$entitytype"/>
215
                         <xsl:with-param name="entityindex" select="$entityindex"/>
216
                     </xsl:call-template>
217
                  </xsl:if>
218
              </xsl:for-each>
219
            </xsl:if>
220 1680 tao
            <xsl:if test="$entitytype='spatialRaster'">
221
               <xsl:for-each select="spatialRaster">
222
                  <xsl:if test="position()=$entityindex">
223
                     <xsl:call-template name="spatialRaster">
224
                         <xsl:with-param name="spatialrasterfirstColStyle" select="$firstColStyle"/>
225
                         <xsl:with-param name="spatialrastersubHeaderStyle" select="$subHeaderStyle"/>
226
                         <xsl:with-param name="docid" select="$docid"/>
227
                         <xsl:with-param name="entitytype" select="$entitytype"/>
228
                         <xsl:with-param name="entityindex" select="$entityindex"/>
229
                     </xsl:call-template>
230
                  </xsl:if>
231
              </xsl:for-each>
232
            </xsl:if>
233
            <xsl:if test="$entitytype='spatialVector'">
234
               <xsl:for-each select="spatialVector">
235
                  <xsl:if test="position()=$entityindex">
236
                     <xsl:call-template name="spatialVector">
237
                         <xsl:with-param name="spatialvectorfirstColStyle" select="$firstColStyle"/>
238
                         <xsl:with-param name="spatialvectorsubHeaderStyle" select="$subHeaderStyle"/>
239
                         <xsl:with-param name="docid" select="$docid"/>
240
                         <xsl:with-param name="entitytype" select="$entitytype"/>
241
                         <xsl:with-param name="entityindex" select="$entityindex"/>
242
                     </xsl:call-template>
243
                  </xsl:if>
244
              </xsl:for-each>
245
            </xsl:if>
246
            <xsl:if test="$entitytype='storedProcedure'">
247
               <xsl:for-each select="storedProcedure">
248
                  <xsl:if test="position()=$entityindex">
249
                     <xsl:call-template name="storedProcedure">
250
                         <xsl:with-param name="storedprocedurefirstColStyle" select="$firstColStyle"/>
251
                         <xsl:with-param name="storedproceduresubHeaderStyle" select="$subHeaderStyle"/>
252
                         <xsl:with-param name="docid" select="$docid"/>
253
                         <xsl:with-param name="entitytype" select="$entitytype"/>
254
                         <xsl:with-param name="entityindex" select="$entityindex"/>
255
                     </xsl:call-template>
256
                  </xsl:if>
257
              </xsl:for-each>
258
            </xsl:if>
259
            <xsl:if test="$entitytype='view'">
260
               <xsl:for-each select="view">
261
                  <xsl:if test="position()=$entityindex">
262
                     <xsl:call-template name="view">
263
                         <xsl:with-param name="viewfirstColStyle" select="$firstColStyle"/>
264
                         <xsl:with-param name="viewsubHeaderStyle" select="$subHeaderStyle"/>
265
                         <xsl:with-param name="docid" select="$docid"/>
266
                         <xsl:with-param name="entitytype" select="$entitytype"/>
267
                         <xsl:with-param name="entityindex" select="$entityindex"/>
268
                     </xsl:call-template>
269
                  </xsl:if>
270
              </xsl:for-each>
271
            </xsl:if>
272
            <xsl:if test="$entitytype='otherEntity'">
273
               <xsl:for-each select="view">
274
                  <xsl:if test="position()=$entityindex">
275
                     <xsl:call-template name="otherEntity">
276
                         <xsl:with-param name="otherentityfirstColStyle" select="$firstColStyle"/>
277
                         <xsl:with-param name="otherentitysubHeaderStyle" select="$subHeaderStyle"/>
278
                         <xsl:with-param name="docid" select="$docid"/>
279
                         <xsl:with-param name="entitytype" select="$entitytype"/>
280
                         <xsl:with-param name="entityindex" select="$entityindex"/>
281
                     </xsl:call-template>
282
                  </xsl:if>
283
              </xsl:for-each>
284
            </xsl:if>
285 1632 tao
          </td>
286
      </tr>
287
   </xsl:template>
288
289
   <!--************ Attribute part *****************-->
290
    <xsl:template name="attributepart">
291
      <tr><td>
292
         <center>
293 1661 tao
            <h3>Attributes Description</h3>
294 1632 tao
         </center>
295
      </td></tr>
296
      <tr>
297
           <td width="100%">
298
              <!-- find the subtree to process -->
299
            <xsl:if test="$entitytype='dataTable'">
300
              <xsl:for-each select="dataTable">
301
                  <xsl:if test="position()=$entityindex">
302
                      <xsl:for-each select="attributeList">
303
                         <xsl:call-template name="attributelist">
304
                            <xsl:with-param name="docid" select="$docid"/>
305
                            <xsl:with-param name="entitytype" select="$entitytype"/>
306
                            <xsl:with-param name="entityindex" select="$entityindex"/>
307
                         </xsl:call-template>
308
                      </xsl:for-each>
309
                  </xsl:if>
310
              </xsl:for-each>
311
            </xsl:if>
312
          </td>
313
      </tr>
314
   </xsl:template>
315
316 1680 tao
   <!--************************Attribute Domain************************-->
317 1632 tao
318
319
320 1680 tao
   <!--************************Attribute Method************************-->
321 1632 tao
322 1680 tao
323
324
   <!--************************Attribute Coverage************************-->
325
326
327
   <!--*************************Distribution Inline Data*****************-->
328
329
330
331
332
333 1632 tao
     <!--********************************************************
334
                     Citation part
335
       ********************************************************-->
336
   <xsl:template name="emlcitation">
337
       <center>
338 1661 tao
          <h3>Citation Description</h3>
339 553 tao
        </center>
340 1632 tao
        <table class="tabledefault" width="100%">
341
        <tr>
342
          <td width="100%">
343
            <xsl:call-template name="identifier">
344 553 tao
              <xsl:with-param name="packageID" select="../@packageId"/>
345
              <xsl:with-param name="system" select="../@system"/>
346 1632 tao
           </xsl:call-template>
347
          </td>
348
        </tr>
349
        <tr>
350
          <td width="100%">
351
            <xsl:call-template name="citation">
352
               <xsl:with-param name="citationfirstColStyle" select="$firstColStyle"/>
353
               <xsl:with-param name="citationsubHeaderStyle" select="$subHeaderStyle"/>
354
           </xsl:call-template>
355
          </td>
356
        </tr>
357
     </table>
358 553 tao
   </xsl:template>
359
360 1632 tao
361
362
     <!--********************************************************
363
                    Software part
364
       ********************************************************-->
365
366
   <xsl:template name="emlsoftware">
367
     <center>
368 1661 tao
          <h3>Software Description</h3>
369 1632 tao
     </center>
370
     <table class="tabledefault" width="100%">
371
       <tr><td width="100%">
372
           <xsl:call-template name="identifier">
373 553 tao
              <xsl:with-param name="packageID" select="../@packageId"/>
374
              <xsl:with-param name="system" select="../@system"/>
375 1632 tao
           </xsl:call-template>
376
        </td></tr>
377 1680 tao
         <tr>
378
          <td width="100%">
379
            <xsl:call-template name="software">
380
               <xsl:with-param name="softwarefirstColStyle" select="$firstColStyle"/>
381
               <xsl:with-param name="softwaresubHeaderStyle" select="$subHeaderStyle"/>
382
           </xsl:call-template>
383
          </td>
384
        </tr>
385 1632 tao
     </table>
386 553 tao
   </xsl:template>
387
388 1632 tao
389
     <!--********************************************************
390
                    Protocal part
391
       ********************************************************-->
392
393
   <xsl:template name="emlprotocol">
394
    <center>
395 1661 tao
          <h3>Protocol Description</h3>
396
    </center>
397 1632 tao
     <table class="tabledefault" width="100%">
398
       <tr><td width="100%">
399
          <xsl:call-template name="identifier">
400 553 tao
              <xsl:with-param name="packageID" select="../@packageId"/>
401
              <xsl:with-param name="system" select="../@system"/>
402 1632 tao
          </xsl:call-template>
403
       </td></tr>
404 1680 tao
       <tr>
405
       <td width="100%">
406
            <xsl:call-template name="protocol">
407
               <xsl:with-param name="protocolfirstColStyle" select="$firstColStyle"/>
408
               <xsl:with-param name="protocolsubHeaderStyle" select="$subHeaderStyle"/>
409
           </xsl:call-template>
410
          </td>
411
        </tr>
412 1632 tao
     </table>
413 553 tao
   </xsl:template>
414
415
</xsl:stylesheet>