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