1 |
34
|
jones
|
<?xml version="1.0"?>
|
2 |
|
|
<!--
|
3 |
666
|
jones
|
* '$RCSfile$'
|
4 |
34
|
jones
|
* Authors: Matt Jones
|
5 |
666
|
jones
|
* Copyright: 2000 Regents of the University of California and the
|
6 |
34
|
jones
|
* National Center for Ecological Analysis and Synthesis
|
7 |
|
|
* For Details: http://www.nceas.ucsb.edu/
|
8 |
|
|
*
|
9 |
666
|
jones
|
* '$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 |
34
|
jones
|
* 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 |
65
|
bojilova
|
<xsl:output method="html" encoding="iso-8859-1"/>
|
35 |
34
|
jones
|
|
36 |
|
|
<xsl:template match="/">
|
37 |
|
|
<html>
|
38 |
|
|
<head>
|
39 |
506
|
jones
|
<link rel="stylesheet" type="text/css"
|
40 |
827
|
jones
|
href="@style-path@/default.css" />
|
41 |
34
|
jones
|
</head>
|
42 |
506
|
jones
|
<body>
|
43 |
65
|
bojilova
|
<center>
|
44 |
34
|
jones
|
<h1>Data set description</h1>
|
45 |
|
|
<h3>Ecological Metadata Language</h3>
|
46 |
|
|
</center>
|
47 |
823
|
jones
|
<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 |
34
|
jones
|
<xsl:apply-templates/>
|
54 |
|
|
|
55 |
|
|
<table width="100%">
|
56 |
497
|
jones
|
<tr><td class="highlight">
|
57 |
34
|
jones
|
<b><xsl:text>Keywords:</xsl:text></b>
|
58 |
|
|
</td></tr>
|
59 |
|
|
<tr><td>
|
60 |
|
|
<ul>
|
61 |
823
|
jones
|
<xsl:for-each select="//keywordSet/keyword">
|
62 |
34
|
jones
|
<li><xsl:value-of select="."/></li>
|
63 |
|
|
</xsl:for-each>
|
64 |
|
|
</ul>
|
65 |
|
|
</td></tr>
|
66 |
|
|
</table>
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
<table width="100%">
|
70 |
497
|
jones
|
<tr><td class="highlight">
|
71 |
34
|
jones
|
<b><xsl:text>Related Metadata and Data Files:</xsl:text></b>
|
72 |
|
|
</td></tr>
|
73 |
|
|
<tr><td>
|
74 |
|
|
<ul>
|
75 |
823
|
jones
|
<xsl:for-each select="//triple">
|
76 |
34
|
jones
|
<li>
|
77 |
823
|
jones
|
<xsl:value-of select="./subject"/>
|
78 |
34
|
jones
|
<xsl:text> </xsl:text>
|
79 |
823
|
jones
|
<xsl:value-of select="./relationship"/>
|
80 |
34
|
jones
|
<xsl:text> </xsl:text>
|
81 |
823
|
jones
|
<xsl:value-of select="./object"/>
|
82 |
34
|
jones
|
</li>
|
83 |
|
|
</xsl:for-each>
|
84 |
|
|
</ul>
|
85 |
|
|
</td></tr>
|
86 |
|
|
</table>
|
87 |
|
|
|
88 |
|
|
</body>
|
89 |
|
|
</html>
|
90 |
|
|
</xsl:template>
|
91 |
|
|
|
92 |
823
|
jones
|
<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 |
34
|
jones
|
</xsl:template>
|
103 |
|
|
|
104 |
|
|
<xsl:template match="title"/>
|
105 |
823
|
jones
|
<xsl:template match="title" mode="layout">
|
106 |
|
|
<tr>
|
107 |
|
|
<td class="highlight"><b><xsl:text>Title:</xsl:text></b></td>
|
108 |
827
|
jones
|
<td><b><xsl:value-of select="."/></b></td>
|
109 |
823
|
jones
|
</tr>
|
110 |
|
|
</xsl:template>
|
111 |
34
|
jones
|
|
112 |
823
|
jones
|
<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 |
34
|
jones
|
<xsl:template match="originator[1]">
|
127 |
823
|
jones
|
<p><xsl:text> </xsl:text></p>
|
128 |
34
|
jones
|
<table width="100%">
|
129 |
497
|
jones
|
<tr><td class="highlight">
|
130 |
34
|
jones
|
<b><xsl:text>Data Set Owner(s):</xsl:text></b>
|
131 |
|
|
</td></tr>
|
132 |
|
|
</table>
|
133 |
823
|
jones
|
<p class="indent">
|
134 |
|
|
<xsl:apply-templates/>
|
135 |
|
|
</p>
|
136 |
34
|
jones
|
</xsl:template>
|
137 |
|
|
|
138 |
823
|
jones
|
<xsl:template match="organizationName">
|
139 |
34
|
jones
|
<br><b><xsl:value-of select="."/></b></br>
|
140 |
|
|
</xsl:template>
|
141 |
|
|
|
142 |
823
|
jones
|
<xsl:template match="individualName">
|
143 |
34
|
jones
|
<br>
|
144 |
|
|
<b>
|
145 |
|
|
<xsl:value-of select="./salutation"/>
|
146 |
|
|
<xsl:text> </xsl:text>
|
147 |
823
|
jones
|
<xsl:value-of select="./givenName"/>
|
148 |
34
|
jones
|
<xsl:text> </xsl:text>
|
149 |
823
|
jones
|
<xsl:value-of select="./surName"/>
|
150 |
34
|
jones
|
</b></br>
|
151 |
|
|
</xsl:template>
|
152 |
|
|
|
153 |
823
|
jones
|
<xsl:template match="address">
|
154 |
34
|
jones
|
<table>
|
155 |
823
|
jones
|
<xsl:for-each select="./deliveryPoint">
|
156 |
34
|
jones
|
<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 |
823
|
jones
|
<xsl:value-of select="./administrativeArea"/>
|
164 |
34
|
jones
|
<xsl:text> </xsl:text>
|
165 |
823
|
jones
|
<xsl:value-of select="./postalCode"/>
|
166 |
34
|
jones
|
</td>
|
167 |
|
|
</tr>
|
168 |
823
|
jones
|
<xsl:if test="./country">
|
169 |
|
|
<tr><td><xsl:value-of select="./country"/></td></tr>
|
170 |
34
|
jones
|
</xsl:if>
|
171 |
|
|
</table>
|
172 |
|
|
</xsl:template>
|
173 |
|
|
|
174 |
823
|
jones
|
<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 |
34
|
jones
|
<xsl:template match="abstract">
|
191 |
|
|
<table width="100%">
|
192 |
|
|
<tr>
|
193 |
497
|
jones
|
<td class="highlight"><b><xsl:text>Abstract:</xsl:text></b></td>
|
194 |
34
|
jones
|
</tr>
|
195 |
|
|
<tr>
|
196 |
823
|
jones
|
<td><xsl:value-of select="./paragraph"/></td>
|
197 |
34
|
jones
|
</tr></table>
|
198 |
|
|
</xsl:template>
|
199 |
|
|
|
200 |
823
|
jones
|
<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 |
34
|
jones
|
|
210 |
823
|
jones
|
<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 |
85
|
jones
|
</xsl:stylesheet>
|