Project

General

Profile

1
<?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: jones $'
10
  *     '$Date: 2001-09-13 19:26:43 -0700 (Thu, 13 Sep 2001) $'
11
  * '$Revision: 829 $'
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

    
34
  <xsl:output method="html" encoding="iso-8859-1"/>
35

    
36
  <xsl:template match="/">
37
    <html>
38
      <head>
39
        <link rel="stylesheet" type="text/css" 
40
              href="@style-path@/default.css" />
41
      </head>
42
      <body>
43
        <center>
44
          <h1>Data set description</h1>
45
          <h3>Ecological Metadata Language</h3>
46
        </center>
47
        <table width="100%">
48
        <xsl:apply-templates select="/dataset/title" mode="layout"/>
49
        <xsl:apply-templates select="/dataset/shortName" mode="layout"/>
50
        <xsl:apply-templates select="/dataset/identifier" mode="layout"/>
51
        </table>
52

    
53
        <xsl:apply-templates/>      
54

    
55

    
56
        <table width="100%">
57
        <tr><td class="highlight">
58
        <b><xsl:text>Related Metadata and Data Files:</xsl:text></b>
59
        </td></tr>
60
        <tr><td>
61
        <ul>
62
          <xsl:for-each select="//triple">
63
            <li>
64
             <a><xsl:attribute name="href"><![CDATA[@html-path@/servlet/metacat?action=read&qformat=html&docid=]]><xsl:value-of select="./subject"/></xsl:attribute><xsl:value-of select="./subject"/></a>
65
             <xsl:text> </xsl:text>
66
             <xsl:value-of select="./relationship"/>
67
             <xsl:text> </xsl:text>
68
             <a><xsl:attribute name="href"><![CDATA[@html-path@/servlet/metacat?action=read&qformat=html&docid=]]><xsl:value-of select="./object"/></xsl:attribute><xsl:value-of select="./object"/></a>
69
            </li>
70
          </xsl:for-each>
71
        </ul>
72
        </td></tr>
73
        </table>
74

    
75
      </body>
76
    </html>
77
  </xsl:template>
78

    
79
  <xsl:template match="identifier"/>
80
  <xsl:template match="identifier" mode="layout">
81
     <tr>
82
       <td class="highlight"><b><xsl:text>Metadata Identifier:</xsl:text></b></td>
83
       <td><xsl:value-of select="."/>
84
       <xsl:if test="./@system">
85
         (Metadata system=<xsl:value-of select="./@system"/>)
86
       </xsl:if>
87
       </td>
88
     </tr>
89
  </xsl:template>
90

    
91
  <xsl:template match="title"/>
92
  <xsl:template match="title" mode="layout">
93
     <tr>
94
       <td class="highlight"><b><xsl:text>Title:</xsl:text></b></td>
95
       <td><b><xsl:value-of select="."/></b></td>
96
     </tr>
97
  </xsl:template>
98

    
99
  <xsl:template match="shortName"/>
100
  <xsl:template match="shortName" mode="layout">
101
     <tr>
102
       <td class="highlight"><b><xsl:text>Short Name:</xsl:text></b></td>
103
       <td><xsl:value-of select="."/></td>
104
     </tr>
105
  </xsl:template>
106

    
107
  <xsl:template match="originator">
108
    <p class="indent">
109
      <xsl:apply-templates/>
110
    </p>
111
  </xsl:template>
112

    
113
  <xsl:template match="originator[1]">
114
      <p><xsl:text> </xsl:text></p>
115
      <table width="100%">
116
      <tr><td class="highlight">
117
      <b><xsl:text>Data Set Owner(s):</xsl:text></b>
118
      </td></tr>
119
      </table>
120
      <p class="indent">
121
        <xsl:apply-templates/>
122
      </p>
123
  </xsl:template>
124

    
125
  <xsl:template match="organizationName">
126
    <b><xsl:value-of select="."/></b><br />
127
  </xsl:template>
128

    
129
  <xsl:template match="individualName">
130
    <b>
131
       <xsl:value-of select="./salutation"/>
132
       <xsl:text> </xsl:text>
133
       <xsl:value-of select="./givenName"/>
134
       <xsl:text> </xsl:text>
135
       <xsl:value-of select="./surName"/>
136
    </b><br />
137
  </xsl:template>
138

    
139
  <xsl:template match="address">
140
    <table>
141
    <xsl:for-each select="./deliveryPoint">
142
      <tr>
143
      <td><xsl:value-of select="."/></td>
144
      </tr>
145
    </xsl:for-each>
146
    <tr>
147
    <td><xsl:value-of select="./city"/>
148
        <xsl:text>, </xsl:text>
149
        <xsl:value-of select="./administrativeArea"/>
150
        <xsl:text> </xsl:text>
151
        <xsl:value-of select="./postalCode"/>
152
    </td>
153
    </tr>
154
    <xsl:if test="./country">
155
      <tr><td><xsl:value-of select="./country"/></td></tr>
156
    </xsl:if>
157
    </table>
158
  </xsl:template>
159

    
160
  <xsl:template match="phone">
161
      <xsl:text>Phone: </xsl:text><xsl:value-of select="."/><br />
162
  </xsl:template>
163

    
164
  <xsl:template match="electronicMailAddress">
165
      <xsl:text>Email: </xsl:text><xsl:value-of select="."/><br />
166
  </xsl:template>
167

    
168
  <xsl:template match="onlineLink">
169
      <xsl:text>URL: </xsl:text><xsl:value-of select="."/><br />
170
  </xsl:template>
171

    
172
  <xsl:template match="role">
173
      <xsl:text>Role: </xsl:text><xsl:value-of select="."/><br />
174
  </xsl:template>
175

    
176
  <xsl:template match="abstract">
177
    <table width="100%">
178
    <tr>
179
    <td class="highlight"><b><xsl:text>Abstract:</xsl:text></b></td>
180
    </tr>
181
    <tr>
182
    <td><xsl:value-of select="./paragraph"/></td>
183
    </tr></table>
184
  </xsl:template>
185

    
186
  <xsl:template match="rights">
187
    <table width="100%">
188
    <tr>
189
    <td class="highlight"><b><xsl:text>License and Usage Rights:</xsl:text></b></td>
190
    </tr>
191
    <tr>
192
    <td><xsl:value-of select="./paragraph"/></td>
193
    </tr></table>
194
  </xsl:template>
195

    
196
  <xsl:template match="additionalInfo">
197
    <table width="100%">
198
    <tr>
199
    <td class="highlight"><b><xsl:text>Additional Information:</xsl:text></b></td>
200
    </tr>
201
    <tr>
202
    <td><xsl:value-of select="./paragraph"/></td>
203
    </tr></table>
204
  </xsl:template>
205

    
206
  <xsl:template match="onlineURL">
207
    <table width="100%">
208
    <tr>
209
    <td class="highlight"><b><xsl:text>Online Distribution information:</xsl:text></b></td>
210
    </tr>
211
    <tr>
212
    <td><a>
213
          <xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute>
214
          <xsl:value-of select="."/>
215
        </a>
216
    </td>
217
    </tr></table>
218
  </xsl:template>
219

    
220
  <xsl:template match="offlineMedium">
221
    <table width="100%">
222
    <tr>
223
    <td class="highlight"><b><xsl:text>Offline Distribution information:</xsl:text></b></td>
224
    </tr>
225
    <xsl:apply-templates/>
226
    </table>
227
  </xsl:template>
228

    
229
  <xsl:template match="medName">
230
    <tr><td><xsl:text>Medium: </xsl:text><xsl:value-of select="."/></td></tr>
231
  </xsl:template>
232

    
233
  <xsl:template match="temporalCov">
234
    <table width="100%">
235
    <tr>
236
    <td class="highlight"><b><xsl:text>Temporal Coverage:</xsl:text></b></td>
237
    </tr>
238
    <xsl:apply-templates/>
239
    </table>
240
  </xsl:template>
241

    
242
  <xsl:template match="rngdates">
243
    <tr><td>
244
    <xsl:text>Date Range: </xsl:text>
245
    <xsl:apply-templates select="begdate"/>
246
    <xsl:text> </xsl:text><xsl:apply-templates select="begtime"/>
247
    <xsl:text> </xsl:text><xsl:apply-templates select="beggeol"/>
248
    <xsl:text> to </xsl:text>
249
    <xsl:apply-templates select="enddate"/>
250
    <xsl:text> </xsl:text><xsl:apply-templates select="endtime"/>
251
    <xsl:text> </xsl:text><xsl:apply-templates select="endgeol"/>
252
    </td></tr>
253
  </xsl:template>
254

    
255
  <xsl:template match="sngdate">
256
    <tr><td>
257
    <xsl:text>Date: </xsl:text>
258
    <xsl:apply-templates select="caldate"/>
259
    <xsl:text> </xsl:text><xsl:apply-templates select="time"/>
260
    <xsl:text> </xsl:text><xsl:apply-templates select="geolage"/>
261
    </td></tr>
262
  </xsl:template>
263

    
264
  <xsl:template match="mdattim">
265
    <xsl:apply-templates/>
266
  </xsl:template>
267

    
268
  <xsl:template match="geographicCov">
269
    <table width="100%">
270
    <tr>
271
    <td class="highlight"><b><xsl:text>Geographic Coverage:</xsl:text></b></td>
272
    </tr>
273
    <tr><td><xsl:apply-templates/></td></tr>
274
    </table>
275
  </xsl:template>
276

    
277
  <xsl:template match="descgeog">
278
    <p>
279
    <xsl:text>Description: </xsl:text>
280
    <xsl:value-of select="."/>
281
    </p>
282
  </xsl:template>
283

    
284
  <xsl:template match="westbc">
285
    <xsl:text>West Bounding coordinate: </xsl:text>
286
    <xsl:value-of select="."/> degrees<br />
287
  </xsl:template>
288

    
289
  <xsl:template match="eastbc">
290
    <xsl:text>East Bounding coordinate: </xsl:text>
291
    <xsl:value-of select="."/> degrees<br />
292
  </xsl:template>
293

    
294
  <xsl:template match="northbc">
295
    <xsl:text>North Bounding coordinate: </xsl:text>
296
    <xsl:value-of select="."/> degrees<br />
297
  </xsl:template>
298

    
299
  <xsl:template match="southbc">
300
    <xsl:text>South Bounding coordinate: </xsl:text>
301
    <xsl:value-of select="."/> degrees<br />
302
  </xsl:template>
303

    
304
  <xsl:template match="taxonomicCov">
305
    <table width="100%">
306
    <tr>
307
    <td class="highlight"><b><xsl:text>Taxomomic Coverage:</xsl:text></b></td>
308
    </tr>
309
    <tr><td><xsl:apply-templates/></td></tr>
310
    </table>
311
  </xsl:template>
312

    
313
  <xsl:template match="keywtax">
314
    <p>
315
    <xsl:text>Taxon Keywords: </xsl:text>
316
    <xsl:apply-templates select="taxonkey"/>
317
    </p>
318
  </xsl:template>
319

    
320
  <xsl:template match="taxoncl">
321
    <p class="indent">
322
    <xsl:text>Name: </xsl:text><xsl:value-of select="taxonrv"/>
323
    <a target="itisca">
324
      <xsl:attribute name="href"><xsl:text><![CDATA[http://sis.agr.gc.ca/pls/itisca/taxastep?king=every&p_action=containing&p_ifx=aafc&taxa=]]></xsl:text><xsl:value-of select="taxonrv"/></xsl:attribute>
325
      Check ITIS*ca for this taxon
326
    </a>
327
    <br />
328
    <xsl:text>Rank: </xsl:text><xsl:value-of select="taxonrn"/><br />
329
    <xsl:text>Common name: </xsl:text><xsl:value-of select="common"/><br />
330
    <xsl:apply-templates select="taxoncl"/>
331
    </p>
332
  </xsl:template>
333

    
334
  <xsl:template match="keywordSet">
335
    <table width="100%">
336
    <tr><td class="highlight">
337
    <b><xsl:text>Keywords:</xsl:text></b>
338
    </td></tr>
339
    <xsl:if test="./keywordThesaurus">
340
      <tr><td>Thesaurus: <xsl:value-of select="keywordThesaurus"/></td></tr>
341
    </xsl:if>
342
    <tr><td>
343
      <ul>
344
        <xsl:for-each select="keyword">
345
          <li><xsl:value-of select="."/> 
346
          <xsl:if test="./@keywordType">
347
            (<xsl:value-of select="./@keywordType"/>)
348
          </xsl:if>
349
          </li>
350
        </xsl:for-each>
351
      </ul>
352
    </td></tr>
353
    </table>
354
  </xsl:template>
355
         
356
  <xsl:template match="triple"/>
357

    
358
</xsl:stylesheet>
(2-2/8)