1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<xsl:stylesheet version="1.0" xmlns:dct="http://purl.org/dc/terms/"
|
3
|
xmlns:dcx="http://ns.dataone.org/metadata/schema/onedcx/v1.0"
|
4
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
5
|
xmlns="http://purl.org/dc/terms/">
|
6
|
|
7
|
|
8
|
<xsl:template name="onedcx">
|
9
|
<article class="container" id="Metadata">
|
10
|
<form class="form-horizontal">
|
11
|
<xsl:for-each select="*">
|
12
|
|
13
|
<xsl:call-template name="citation" />
|
14
|
<xsl:call-template name="general" />
|
15
|
<xsl:call-template name="keywords" />
|
16
|
<xsl:call-template name="people" />
|
17
|
<xsl:call-template name="geography" />
|
18
|
<xsl:call-template name="temporal" />
|
19
|
|
20
|
</xsl:for-each>
|
21
|
</form>
|
22
|
|
23
|
|
24
|
</article>
|
25
|
</xsl:template>
|
26
|
|
27
|
<xsl:template name="citation">
|
28
|
<cite class="citation">
|
29
|
<xsl:value-of
|
30
|
select="normalize-space(dcx:dcTerms/dct:bibliographicCitation)" />
|
31
|
</cite>
|
32
|
</xsl:template>
|
33
|
|
34
|
<xsl:template name="general">
|
35
|
<h4>General Content</h4>
|
36
|
<div class="control-group">
|
37
|
<label class="control-label">Title</label>
|
38
|
<div class="controls controls-well">
|
39
|
<strong>
|
40
|
<xsl:value-of select="normalize-space(dcx:simpleDc/dct:title)" />
|
41
|
</strong>
|
42
|
</div>
|
43
|
</div>
|
44
|
<div class="control-group">
|
45
|
<label class="control-label">Identifier</label>
|
46
|
<div class="controls">
|
47
|
<div class="controls-well">
|
48
|
<xsl:value-of select="$pid" />
|
49
|
</div>
|
50
|
</div>
|
51
|
</div>
|
52
|
<div class="control-group">
|
53
|
<label class="control-label">Alternate Identifier</label>
|
54
|
<div class="controls">
|
55
|
<div class="controls-well">
|
56
|
<xsl:value-of select="normalize-space(dcx:simpleDc/dct:identifier)" />
|
57
|
</div>
|
58
|
</div>
|
59
|
</div>
|
60
|
|
61
|
<div class="control-group">
|
62
|
<label class="control-label">Online Access</label>
|
63
|
<div class="controls controls-well">
|
64
|
<xsl:for-each select="dcx:dcTerms/dct:references">
|
65
|
<a>
|
66
|
<xsl:attribute name="href">
|
67
|
<xsl:value-of select="." />
|
68
|
</xsl:attribute>
|
69
|
<xsl:value-of select="." />
|
70
|
</a>
|
71
|
</xsl:for-each>
|
72
|
</div>
|
73
|
</div>
|
74
|
|
75
|
|
76
|
<div class="control-group">
|
77
|
<label class="control-label">Abstract</label>
|
78
|
<div class="controls controls-well">
|
79
|
<div class="sectionText">
|
80
|
<p>
|
81
|
<xsl:value-of select="normalize-space(dcx:dcTerms/dct:abstract)" />
|
82
|
</p>
|
83
|
</div>
|
84
|
</div>
|
85
|
</div>
|
86
|
</xsl:template>
|
87
|
|
88
|
<xsl:template name="keywords">
|
89
|
<div class="row-fluid">
|
90
|
<div class="control-group">
|
91
|
<label class="control-label">Keywords (Dublin Core Terms subject)</label>
|
92
|
<div class="controls controls-well">
|
93
|
<table class="table table-striped table-condensed">
|
94
|
<thead>
|
95
|
<tr>
|
96
|
<th>Keyword</th>
|
97
|
<th>Type</th>
|
98
|
</tr>
|
99
|
</thead>
|
100
|
<xsl:apply-templates select="dcx:simpleDc/dct:subject" />
|
101
|
</table>
|
102
|
</div>
|
103
|
|
104
|
</div>
|
105
|
</div>
|
106
|
</xsl:template>
|
107
|
|
108
|
<xsl:template name="keyword" match="dct:subject">
|
109
|
<tr>
|
110
|
<td>
|
111
|
<xsl:value-of select="." />
|
112
|
</td>
|
113
|
<td></td>
|
114
|
</tr>
|
115
|
</xsl:template>
|
116
|
|
117
|
<xsl:template name="people">
|
118
|
<h4>Creators</h4>
|
119
|
<xsl:for-each select="dcx:simpleDc/dct:creator">
|
120
|
<div class="controls controls-well">
|
121
|
<xsl:value-of select="." />
|
122
|
</div>
|
123
|
</xsl:for-each>
|
124
|
|
125
|
</xsl:template>
|
126
|
|
127
|
<xsl:template name="geography">
|
128
|
<div class="row-fluid">
|
129
|
<div data-content="geographicCoverage" class="row-fluid geographicCoverage">
|
130
|
<h4>Geographic Region</h4>
|
131
|
<div data-content="geographicDescription" class="control-group geographicDescription">
|
132
|
<label class="control-label">Geographic Description</label>
|
133
|
<div class="controls controls-well">
|
134
|
<xsl:value-of
|
135
|
select="//dcx:dcTerms/dct:spatial[not(@xsi:type='dcterms:Box')]" />
|
136
|
</div>
|
137
|
</div>
|
138
|
|
139
|
<div data-content="boundingCoordinates" class="control-group boundingCoordinates">
|
140
|
<label class="control-label">Bounding Coordinates</label>
|
141
|
<div class="controls controls-well">
|
142
|
<xsl:for-each select="//dcx:dcTerms/dct:spatial[@xsi:type='Box']">
|
143
|
<xsl:call-template name="extract-coordinates" />
|
144
|
</xsl:for-each>
|
145
|
</div>
|
146
|
</div>
|
147
|
|
148
|
</div>
|
149
|
</div>
|
150
|
</xsl:template>
|
151
|
|
152
|
<xsl:template name="extract-coordinates">
|
153
|
<xsl:call-template name="show-coordinate">
|
154
|
<xsl:with-param name="data" select="." />
|
155
|
<xsl:with-param name="corner" select="'northlimit'" />
|
156
|
<xsl:with-param name="label" select="'North'" />
|
157
|
<xsl:with-param name="bound" select="'northBoundingCoordinate'" />
|
158
|
</xsl:call-template>
|
159
|
<xsl:call-template name="show-coordinate">
|
160
|
<xsl:with-param name="data" select="." />
|
161
|
<xsl:with-param name="corner" select="'southlimit'" />
|
162
|
<xsl:with-param name="label" select="'South'" />
|
163
|
<xsl:with-param name="bound" select="'southBoundingCoordinate'" />
|
164
|
</xsl:call-template>
|
165
|
<xsl:call-template name="show-coordinate">
|
166
|
<xsl:with-param name="data" select="." />
|
167
|
<xsl:with-param name="corner" select="'eastlimit'" />
|
168
|
<xsl:with-param name="label" select="'East'" />
|
169
|
<xsl:with-param name="bound" select="'eastBoundingCoordinate'" />
|
170
|
</xsl:call-template>
|
171
|
<xsl:call-template name="show-coordinate">
|
172
|
<xsl:with-param name="data" select="." />
|
173
|
<xsl:with-param name="corner" select="'westlimit'" />
|
174
|
<xsl:with-param name="label" select="'West'" />
|
175
|
<xsl:with-param name="bound" select="'westBoundingCoordinate'" />
|
176
|
</xsl:call-template>
|
177
|
</xsl:template>
|
178
|
|
179
|
<xsl:template name="show-coordinate">
|
180
|
<xsl:param name="data" />
|
181
|
<xsl:param name="corner" />
|
182
|
<xsl:param name="label" />
|
183
|
<xsl:param name="bound" />
|
184
|
<xsl:variable name="coord"
|
185
|
select="substring-before(substring-after($data,concat($corner,'=')),';')" />
|
186
|
<div data-value="{$coord}" data-content="{$bound}" class="control-group {$bound}">
|
187
|
<label class="control-label">
|
188
|
<xsl:value-of select="$label" />
|
189
|
</label>
|
190
|
<div class="controls controls-well">
|
191
|
<xsl:value-of select="$coord" />
|
192
|
<xsl:text> degrees</xsl:text>
|
193
|
</div>
|
194
|
</div>
|
195
|
</xsl:template>
|
196
|
|
197
|
<xsl:template name="temporal">
|
198
|
<div class="row-fluid">
|
199
|
<div data-content="temporalCoverage" class="row-fluid temporalCoverage">
|
200
|
<h4>Temporal Coverage</h4>
|
201
|
<div class="control-group">
|
202
|
<label class="control-label">Date Range</label>
|
203
|
<div class="controls controls-well">
|
204
|
<div class="control-group">
|
205
|
<label class="control-label">Begin</label>
|
206
|
<div class="controls">
|
207
|
<div class="row-fluid">
|
208
|
<xsl:value-of select="dcx:dcTerms/dct:temporal" />
|
209
|
</div>
|
210
|
</div>
|
211
|
</div>
|
212
|
<div class="control-group">
|
213
|
<label class="control-label">End</label>
|
214
|
<div class="controls">
|
215
|
<div class="row-fluid">
|
216
|
<xsl:value-of select="dcx:dcTerms/dct:temporal" />
|
217
|
</div>
|
218
|
</div>
|
219
|
</div>
|
220
|
</div>
|
221
|
</div>
|
222
|
</div>
|
223
|
</div>
|
224
|
</xsl:template>
|
225
|
|
226
|
</xsl:stylesheet>
|