Project

General

Profile

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
			<xsl:for-each select="*">
11

    
12
				<xsl:call-template name="citation" />
13
				<xsl:call-template name="general" />
14
				<xsl:call-template name="keywords" />
15
				<xsl:call-template name="people" />
16
				<xsl:call-template name="geography" />
17
				<xsl:call-template name="temporal" />
18

    
19
			</xsl:for-each>
20

    
21
		</article>
22
	</xsl:template>
23

    
24
	<xsl:template name="citation">
25
		<cite class="citation">
26
			<xsl:value-of
27
				select="normalize-space(dcx:dcTerms/dct:bibliographicCitation)" />
28
		</cite>
29
	</xsl:template>
30

    
31
	<xsl:template name="general">
32
		<h4>General Content</h4>
33
		<div class="control-group">
34
			<label class="control-label">Title</label>
35
			<div class="controls controls-well">
36
				<strong>
37
					<xsl:value-of select="normalize-space(dcx:simpleDc/dct:title)" />
38
				</strong>
39
			</div>
40
		</div>
41
		<div class="control-group">
42
			<label class="control-label">Identifier</label>
43
			<div class="controls">
44
				<div class="controls-well">
45
					<xsl:value-of select="$pid" />
46
				</div>
47
			</div>
48
		</div>
49
		<div class="control-group">
50
			<label class="control-label">Alternate Identifier</label>
51
			<div class="controls">
52
				<div class="controls-well">
53
					<xsl:value-of select="normalize-space(dcx:simpleDc/dct:identifier)" />
54
				</div>
55
			</div>
56
		</div>
57
		
58
		<div class="control-group">
59
			<label class="control-label">Online Access</label>
60
			<div class="controls controls-well">
61
				<xsl:for-each select="dcx:dcTerms/dct:references">
62
					<a>
63
						<xsl:attribute name="href">
64
							<xsl:value-of select="." />
65
						</xsl:attribute>
66
						<xsl:value-of select="." />
67
					</a>
68
				</xsl:for-each>
69
			</div>
70
		</div>
71
		
72
		
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 (Dublin Core Terms subject)</label>
89
				<div class="controls controls-well">
90
					<table class="table table-striped table-condensed">
91
						<thead>
92
							<tr>
93
								<th>Keyword</th>
94
								<th>Type</th>
95
							</tr>
96
						</thead>
97
						<xsl:apply-templates select="dcx:simpleDc/dct:subject" />
98
					</table>
99
				</div>
100

    
101
			</div>
102
		</div>
103
	</xsl:template>
104

    
105
	<xsl:template name="keyword" match="dct:subject">
106
		<tr>
107
			<td>
108
				<xsl:value-of select="." />
109
			</td>
110
			<td></td>
111
		</tr>
112
	</xsl:template>
113

    
114
	<xsl:template name="people">
115
		<h4>Creators</h4>
116
		<xsl:for-each select="dcx:simpleDc/dct:creator">
117
			<div class="controls controls-well">
118
				<xsl:value-of select="." />
119
			</div>
120
		</xsl:for-each>
121

    
122
	</xsl:template>
123

    
124
	<xsl:template name="geography">
125
		<div class="row-fluid">
126
			<div data-content="geographicCoverage" class="row-fluid geographicCoverage">
127
				<h4>Geographic Region</h4>
128
				<div data-content="geographicDescription" class="control-group geographicDescription">
129
					<label class="control-label">Geographic Description</label>
130
					<div class="controls controls-well">
131
						<xsl:value-of
132
							select="//dcx:dcTerms/dct:spatial[not(@xsi:type='dcterms:Box')]" />
133
					</div>
134
				</div>
135

    
136
				<div data-content="boundingCoordinates" class="control-group boundingCoordinates">
137
					<label class="control-label">Bounding Coordinates</label>
138
					<xsl:for-each select="//dcx:dcTerms/dct:spatial[@xsi:type='Box']">
139
						<xsl:call-template name="extract-coordinates" />
140
					</xsl:for-each>
141
				</div>
142

    
143
			</div>
144
		</div>
145
	</xsl:template>
146

    
147
	<xsl:template name="extract-coordinates">
148
		<xsl:call-template name="show-coordinate">
149
			<xsl:with-param name="data" select="." />
150
			<xsl:with-param name="corner" select="'northlimit'" />
151
			<xsl:with-param name="label" select="'North'" />
152
			<xsl:with-param name="bound" select="'northBoundingCoordinate'" />
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="'southlimit'" />
157
			<xsl:with-param name="label" select="'South'" />
158
			<xsl:with-param name="bound" select="'southBoundingCoordinate'" />
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="'eastlimit'" />
163
			<xsl:with-param name="label" select="'East'" />
164
			<xsl:with-param name="bound" select="'eastBoundingCoordinate'" />
165
		</xsl:call-template>
166
		<xsl:call-template name="show-coordinate">
167
			<xsl:with-param name="data" select="." />
168
			<xsl:with-param name="corner" select="'westlimit'" />
169
			<xsl:with-param name="label" select="'West'" />
170
			<xsl:with-param name="bound" select="'westBoundingCoordinate'" />
171
		</xsl:call-template>
172
	</xsl:template>
173

    
174
	<xsl:template name="show-coordinate">
175
		<xsl:param name="data" />
176
		<xsl:param name="corner" />
177
		<xsl:param name="label" />
178
		<xsl:param name="bound" />
179
		<xsl:variable name="coord"
180
			select="substring-before(substring-after($data,concat($corner,'=')),';')" />
181
		<div data-value="{$coord}" data-content="{$bound}" class="control-group {$bound}">
182
			<label class="control-label">
183
				<xsl:value-of select="$label" />
184
			</label>
185
			<div class="controls controls-well">
186
				<xsl:value-of select="$coord" />
187
				<xsl:text> degrees</xsl:text>
188
			</div>
189
		</div>
190
	</xsl:template>
191

    
192
	<xsl:template name="temporal">
193
		<div class="row-fluid">
194
			<div data-content="temporalCoverage" class="row-fluid temporalCoverage">
195
				<h4>Temporal Coverage</h4>
196
				<div class="control-group">
197
					<label class="control-label">Date Range</label>
198
					<div class="controls controls-well">
199
						<div class="control-group">
200
							<label class="control-label">Begin</label>
201
							<div class="controls">
202
								<div class="row-fluid">
203
									<xsl:value-of select="dcx:dcTerms/dct:temporal" />
204
								</div>
205
							</div>
206
						</div>
207
						<div class="control-group">
208
							<label class="control-label">End</label>
209
							<div class="controls">
210
								<div class="row-fluid">
211
									<xsl:value-of select="dcx:dcTerms/dct:temporal" />
212
								</div>
213
							</div>
214
						</div>
215
					</div>
216
				</div>
217
			</div>
218
		</div>
219
	</xsl:template>
220

    
221
</xsl:stylesheet>
    (1-1/1)