1 |
7982
|
leinfelder
|
<?xml version="1.0"?>
|
2 |
|
|
<!--
|
3 |
|
|
* '$RCSfile$'
|
4 |
|
|
* Authors: Matthew Brooke
|
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-variable.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 |
8005
|
leinfelder
|
<xsl:output method="html" encoding="UTF-8"
|
35 |
7982
|
leinfelder
|
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
|
36 |
|
|
doctype-system="http://www.w3.org/TR/html4/loose.dtd"
|
37 |
|
|
indent="yes" />
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
<xsl:template name="project">
|
41 |
|
|
<xsl:choose>
|
42 |
|
|
<xsl:when test="references!=''">
|
43 |
|
|
<xsl:variable name="ref_id" select="references"/>
|
44 |
|
|
<xsl:variable name="references" select="$ids[@id=$ref_id]" />
|
45 |
|
|
<xsl:for-each select="$references">
|
46 |
9561
|
cjones
|
<div class="row-fluid project" data-content="project">
|
47 |
|
|
<xsl:call-template name="projectcommon" />
|
48 |
|
|
</div>
|
49 |
7982
|
leinfelder
|
</xsl:for-each>
|
50 |
|
|
</xsl:when>
|
51 |
|
|
<xsl:otherwise>
|
52 |
9561
|
cjones
|
<div class="row-fluid project" data-content="project" id="project">
|
53 |
|
|
<xsl:call-template name="projectcommon" />
|
54 |
|
|
</div>
|
55 |
7982
|
leinfelder
|
</xsl:otherwise>
|
56 |
|
|
</xsl:choose>
|
57 |
|
|
</xsl:template>
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
|
|
<xsl:template name="projectcommon">
|
62 |
9561
|
cjones
|
<xsl:call-template name="projecttitle" />
|
63 |
|
|
<xsl:call-template name="projectpersonnel" />
|
64 |
|
|
<xsl:call-template name="projectabstract" />
|
65 |
|
|
<xsl:call-template name="projectfunding" />
|
66 |
|
|
<xsl:call-template name="projectstudyareadescription" />
|
67 |
|
|
<xsl:call-template name="projectdesigndescription" />
|
68 |
|
|
<xsl:call-template name="projectrelatedproject" />
|
69 |
7982
|
leinfelder
|
</xsl:template>
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
|
|
<xsl:template name="projecttitle">
|
74 |
|
|
<xsl:for-each select="title">
|
75 |
9561
|
cjones
|
<div class="control-group">
|
76 |
|
|
<label class="control-label projectTitle">Title:</label>
|
77 |
|
|
<div class="controls controls-well">
|
78 |
|
|
<xsl:value-of select="../title" />
|
79 |
|
|
</div>
|
80 |
|
|
</div>
|
81 |
7982
|
leinfelder
|
</xsl:for-each>
|
82 |
|
|
</xsl:template>
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
<xsl:template name="projectpersonnel">
|
87 |
9561
|
cjones
|
<div class="control-group">
|
88 |
|
|
<label class="control-label projectPersonnel">Personnel:</label>
|
89 |
|
|
<div class="controls control-well">
|
90 |
|
|
<xsl:for-each select="personnel">
|
91 |
|
|
|
92 |
|
|
<xsl:call-template name="party" />
|
93 |
|
|
|
94 |
|
|
<xsl:for-each select="role">
|
95 |
|
|
<label class="control-label projectRole">Role:</label>
|
96 |
|
|
<div class="controls controls-well">
|
97 |
|
|
<xsl:value-of select="." />
|
98 |
|
|
</div>
|
99 |
|
|
</xsl:for-each>
|
100 |
|
|
|
101 |
|
|
</xsl:for-each>
|
102 |
|
|
</div>
|
103 |
|
|
</div>
|
104 |
7982
|
leinfelder
|
</xsl:template>
|
105 |
|
|
|
106 |
|
|
|
107 |
|
|
<xsl:template name="projectabstract">
|
108 |
|
|
<xsl:for-each select="abstract">
|
109 |
9561
|
cjones
|
<div class="control-group">
|
110 |
|
|
<label class="control-label projectAbstract">Abstract:</label>
|
111 |
|
|
<xsl:call-template name="text" />
|
112 |
|
|
</div>
|
113 |
7982
|
leinfelder
|
</xsl:for-each>
|
114 |
|
|
</xsl:template>
|
115 |
|
|
|
116 |
|
|
<xsl:template name="projectfunding">
|
117 |
|
|
<xsl:for-each select="funding">
|
118 |
9561
|
cjones
|
<div class="control-group">
|
119 |
|
|
<label class="control-label projectFunding">Funding:</label>
|
120 |
|
|
<div class="controls controls-well projectFundingValue" >
|
121 |
|
|
<xsl:call-template name="text" />
|
122 |
|
|
</div>
|
123 |
|
|
</div>
|
124 |
7982
|
leinfelder
|
</xsl:for-each>
|
125 |
|
|
</xsl:template>
|
126 |
|
|
|
127 |
|
|
|
128 |
|
|
|
129 |
|
|
<xsl:template name="projectstudyareadescription">
|
130 |
9564
|
cjones
|
<xsl:for-each select="studyAreaDescription">
|
131 |
|
|
<div class="control-group">
|
132 |
|
|
<label class="control-label projectStudyAreaDescription"><xsl:text>Study Area Descriptors:</xsl:text></label>
|
133 |
|
|
<div class="controls controls-well">
|
134 |
|
|
<table class="table table-striped">
|
135 |
|
|
<thead>
|
136 |
|
|
<th>Name</th>
|
137 |
|
|
<th>Code</th>
|
138 |
|
|
<th>Value</th>
|
139 |
|
|
<th>Classification System</th>
|
140 |
|
|
</thead>
|
141 |
|
|
<tbody>
|
142 |
|
|
<xsl:for-each select="descriptor">
|
143 |
|
|
<tr>
|
144 |
|
|
<xsl:for-each select="descriptorValue">
|
145 |
|
|
<td>
|
146 |
|
|
<xsl:value-of select="../@name" />
|
147 |
|
|
</td>
|
148 |
|
|
<td>
|
149 |
|
|
<xsl:value-of select="./@name_or_id" />
|
150 |
|
|
</td>
|
151 |
|
|
<td>
|
152 |
|
|
<xsl:value-of select="." />
|
153 |
|
|
</td>
|
154 |
|
|
<td>
|
155 |
|
|
<xsl:choose>
|
156 |
|
|
<xsl:when test="citation != ''">
|
157 |
|
|
<xsl:for-each select="citation">
|
158 |
|
|
<label class="control-label projectCitation">Citation:</label>
|
159 |
|
|
<div class="controls controls-well">
|
160 |
|
|
<xsl:call-template name="citation" />
|
161 |
|
|
</div>
|
162 |
|
|
</xsl:for-each>
|
163 |
|
|
</xsl:when>
|
164 |
|
|
<xsl:otherwise>
|
165 |
|
|
<xsl:text> </xsl:text>
|
166 |
|
|
</xsl:otherwise>
|
167 |
|
|
</xsl:choose>
|
168 |
|
|
</td>
|
169 |
|
|
</xsl:for-each>
|
170 |
|
|
</tr>
|
171 |
|
|
</xsl:for-each>
|
172 |
|
|
</tbody>
|
173 |
|
|
</table>
|
174 |
|
|
</div>
|
175 |
|
|
</div>
|
176 |
|
|
|
177 |
|
|
<xsl:for-each select="citation">
|
178 |
|
|
<div class="control-group">
|
179 |
|
|
<label class="control-label projectCitation">Study Area Citation:</label>
|
180 |
|
|
<div class="controls controls-well">
|
181 |
|
|
<xsl:call-template name="citation" />
|
182 |
|
|
</div>
|
183 |
|
|
</div>
|
184 |
|
|
|
185 |
|
|
</xsl:for-each>
|
186 |
|
|
|
187 |
|
|
<xsl:for-each select="coverage">
|
188 |
9561
|
cjones
|
<div class="control-group">
|
189 |
9564
|
cjones
|
<label class="control-label">Study Area Coverage:</label>
|
190 |
|
|
<div class="controls controls-well">
|
191 |
|
|
<xsl:call-template name="coverage" />
|
192 |
|
|
</div>
|
193 |
|
|
</div>
|
194 |
|
|
</xsl:for-each>
|
195 |
|
|
</xsl:for-each>
|
196 |
7982
|
leinfelder
|
</xsl:template>
|
197 |
|
|
|
198 |
|
|
|
199 |
|
|
|
200 |
|
|
<xsl:template name="projectdesigndescription">
|
201 |
|
|
<xsl:for-each select="designDescription">
|
202 |
|
|
<xsl:for-each select="description">
|
203 |
9561
|
cjones
|
<div class="control-group">
|
204 |
|
|
<label class="control-label">Design Description:</label>
|
205 |
|
|
<div class="controls controls-well">
|
206 |
7982
|
leinfelder
|
<xsl:call-template name="text"/>
|
207 |
9561
|
cjones
|
</div>
|
208 |
|
|
</div>
|
209 |
7982
|
leinfelder
|
</xsl:for-each>
|
210 |
|
|
<xsl:for-each select="citation">
|
211 |
9561
|
cjones
|
<div class="control-group">
|
212 |
|
|
<label class="control-label">Design Citation:</label>
|
213 |
|
|
<div class="controls controls-well">
|
214 |
7982
|
leinfelder
|
<xsl:call-template name="citation"/>
|
215 |
9561
|
cjones
|
</div>
|
216 |
|
|
</div>
|
217 |
7982
|
leinfelder
|
</xsl:for-each>
|
218 |
|
|
</xsl:for-each>
|
219 |
|
|
</xsl:template>
|
220 |
|
|
|
221 |
|
|
|
222 |
|
|
|
223 |
|
|
<xsl:template name="projectrelatedproject">
|
224 |
|
|
<xsl:for-each select="relatedProject">
|
225 |
9561
|
cjones
|
<div class="control-group">
|
226 |
|
|
<label class="control-label">Related Project:</label>
|
227 |
|
|
<div>
|
228 |
|
|
<xsl:call-template name="project" />
|
229 |
|
|
</div>
|
230 |
|
|
</div>
|
231 |
7982
|
leinfelder
|
</xsl:for-each>
|
232 |
|
|
</xsl:template>
|
233 |
|
|
|
234 |
|
|
|
235 |
|
|
</xsl:stylesheet>
|