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-10 18:38:30 -0700 (Mon, 10 Sep 2001) $'
11
  * '$Revision: 823 $'
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="@web-base-url@/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/identifier" mode="layout"/>
49
        <xsl:apply-templates select="/dataset/title" mode="layout"/>
50
        <xsl:apply-templates select="/dataset/shortName" mode="layout"/>
51
        </table>
52

    
53
        <xsl:apply-templates/>      
54

    
55
        <table width="100%">
56
        <tr><td class="highlight">
57
        <b><xsl:text>Keywords:</xsl:text></b>
58
        </td></tr>
59
        <tr><td>
60
          <ul>
61
            <xsl:for-each select="//keywordSet/keyword">
62
              <li><xsl:value-of select="."/></li>
63
            </xsl:for-each>
64
          </ul>
65
        </td></tr>
66
        </table>
67
         
68

    
69
        <table width="100%">
70
        <tr><td class="highlight">
71
        <b><xsl:text>Related Metadata and Data Files:</xsl:text></b>
72
        </td></tr>
73
        <tr><td>
74
        <ul>
75
          <xsl:for-each select="//triple">
76
            <li>
77
             <xsl:value-of select="./subject"/>
78
             <xsl:text> </xsl:text>
79
             <xsl:value-of select="./relationship"/>
80
             <xsl:text> </xsl:text>
81
             <xsl:value-of select="./object"/>
82
            </li>
83
          </xsl:for-each>
84
        </ul>
85
        </td></tr>
86
        </table>
87

    
88
      </body>
89
    </html>
90
  </xsl:template>
91

    
92
  <xsl:template match="identifier"/>
93
  <xsl:template match="identifier" mode="layout">
94
     <tr>
95
       <td class="highlight"><b><xsl:text>Metadata Identifier:</xsl:text></b></td>
96
       <td><xsl:value-of select="."/>
97
       <xsl:if test="./@system">
98
         (Metadata system=<xsl:value-of select="./@system"/>)
99
       </xsl:if>
100
       </td>
101
     </tr>
102
  </xsl:template>
103

    
104
  <xsl:template match="title"/>
105
  <xsl:template match="title" mode="layout">
106
     <tr>
107
       <td class="highlight"><b><xsl:text>Title:</xsl:text></b></td>
108
       <td><xsl:value-of select="."/></td>
109
     </tr>
110
  </xsl:template>
111

    
112
  <xsl:template match="shortName"/>
113
  <xsl:template match="shortName" mode="layout">
114
     <tr>
115
       <td class="highlight"><b><xsl:text>Short Name:</xsl:text></b></td>
116
       <td><xsl:value-of select="."/></td>
117
     </tr>
118
  </xsl:template>
119

    
120
  <xsl:template match="originator">
121
    <p class="indent">
122
      <xsl:apply-templates/>
123
    </p>
124
  </xsl:template>
125

    
126
  <xsl:template match="originator[1]">
127
      <p><xsl:text> </xsl:text></p>
128
      <table width="100%">
129
      <tr><td class="highlight">
130
      <b><xsl:text>Data Set Owner(s):</xsl:text></b>
131
      </td></tr>
132
      </table>
133
      <p class="indent">
134
        <xsl:apply-templates/>
135
      </p>
136
  </xsl:template>
137

    
138
  <xsl:template match="organizationName">
139
    <br><b><xsl:value-of select="."/></b></br>
140
  </xsl:template>
141

    
142
  <xsl:template match="individualName">
143
    <br>
144
    <b>
145
       <xsl:value-of select="./salutation"/>
146
       <xsl:text> </xsl:text>
147
       <xsl:value-of select="./givenName"/>
148
       <xsl:text> </xsl:text>
149
       <xsl:value-of select="./surName"/>
150
    </b></br>
151
  </xsl:template>
152

    
153
  <xsl:template match="address">
154
    <table>
155
    <xsl:for-each select="./deliveryPoint">
156
      <tr>
157
      <td><xsl:value-of select="."/></td>
158
      </tr>
159
    </xsl:for-each>
160
    <tr>
161
    <td><xsl:value-of select="./city"/>
162
        <xsl:text>, </xsl:text>
163
        <xsl:value-of select="./administrativeArea"/>
164
        <xsl:text> </xsl:text>
165
        <xsl:value-of select="./postalCode"/>
166
    </td>
167
    </tr>
168
    <xsl:if test="./country">
169
      <tr><td><xsl:value-of select="./country"/></td></tr>
170
    </xsl:if>
171
    </table>
172
  </xsl:template>
173

    
174
  <xsl:template match="phone">
175
      <xsl:text>Phone: </xsl:text><xsl:value-of select="."/><br/>
176
  </xsl:template>
177

    
178
  <xsl:template match="electronicMailAddress">
179
      <xsl:text>Email: </xsl:text><xsl:value-of select="."/><br/>
180
  </xsl:template>
181

    
182
  <xsl:template match="onlineLink">
183
      <xsl:text>URL: </xsl:text><xsl:value-of select="."/><br/>
184
  </xsl:template>
185

    
186
  <xsl:template match="role">
187
      <xsl:text>Role: </xsl:text><xsl:value-of select="."/><br/>
188
  </xsl:template>
189

    
190
  <xsl:template match="abstract">
191
    <table width="100%">
192
    <tr>
193
    <td class="highlight"><b><xsl:text>Abstract:</xsl:text></b></td>
194
    </tr>
195
    <tr>
196
    <td><xsl:value-of select="./paragraph"/></td>
197
    </tr></table>
198
  </xsl:template>
199

    
200
  <xsl:template match="rights">
201
    <table width="100%">
202
    <tr>
203
    <td class="highlight"><b><xsl:text>License and Usage Rights:</xsl:text></b></td>
204
    </tr>
205
    <tr>
206
    <td><xsl:value-of select="./paragraph"/></td>
207
    </tr></table>
208
  </xsl:template>
209

    
210
  <xsl:template match="additionalInfo">
211
    <table width="100%">
212
    <tr>
213
    <td class="highlight"><b><xsl:text>Additional Information:</xsl:text></b></td>
214
    </tr>
215
    <tr>
216
    <td><xsl:value-of select="./paragraph"/></td>
217
    </tr></table>
218
  </xsl:template>
219

    
220
  <xsl:template match="keywordSet"/>
221
  <xsl:template match="triple"/>
222

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