Project

General

Profile

Revision 9857

Merge changes from 2.7 branch

View differences:

onedcx-common.xsl
33 33

  
34 34
	<xsl:template name="general">
35 35
		<h4>General Content</h4>
36
		
36 37
		<div class="control-group">
37 38
			<label class="control-label">Title</label>
38 39
			<div class="controls controls-well">
......
41 42
				</strong>
42 43
			</div>
43 44
		</div>
45
		
44 46
		<div class="control-group">
45 47
			<label class="control-label">Identifier</label>
46 48
			<div class="controls">
......
49 51
				</div>
50 52
			</div>
51 53
		</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)" />
54
		
55
		<xsl:if test="dcx:simpleDc/dct:identifier!=''">
56
			<div class="control-group">
57
				<label class="control-label">Alternate Identifier</label>
58
				<div class="controls">
59
					<div class="controls-well">
60
						<xsl:value-of select="normalize-space(dcx:simpleDc/dct:identifier)" />
61
					</div>
57 62
				</div>
58 63
			</div>
59
		</div>
64
		</xsl:if>
60 65
		
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">
66
		<xsl:if test="dcx:dcTerms/dct:references!=''">
67
			<div class="control-group">
68
				<label class="control-label">Online Access</label>
69
				<div class="controls controls-well">
70
					<xsl:for-each select="dcx:dcTerms/dct:references">
71
						<a>
72
							<xsl:attribute name="href">
73
								<xsl:value-of select="." />
74
							</xsl:attribute>
67 75
							<xsl:value-of select="." />
68
						</xsl:attribute>
69
						<xsl:value-of select="." />
70
					</a>
71
				</xsl:for-each>
76
						</a>
77
					</xsl:for-each>
78
				</div>
72 79
			</div>
73
		</div>
80
		</xsl:if>
74 81
		
75
		
76 82
		<div class="control-group">
77 83
			<label class="control-label">Abstract</label>
78 84
			<div class="controls controls-well">
79 85
				<div class="sectionText">
80 86
					<p>
81
						<xsl:value-of select="normalize-space(dcx:dcTerms/dct:abstract)" />
87
						<xsl:value-of select="normalize-space(dcx:dcTerms/dct:abstract|dcx:simpleDc/dct:description)" />
82 88
					</p>
83 89
				</div>
84 90
			</div>
......
116 122

  
117 123
	<xsl:template name="people">
118 124
		<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
		<div class="controls">
126
			<xsl:for-each select="dcx:simpleDc/dct:creator">
127
				<div class="controls-well">
128
					<xsl:value-of select="." />
129
				</div>
130
			</xsl:for-each>
131
		</div>
132
		<xsl:if test="dcx:simpleDc/dct:contributor!=''">
133
			<label class="control-label">Contributors</label>
134
			<xsl:for-each select="dcx:simpleDc/dct:contributor">
135
				<div class="controls controls-well">
136
					<xsl:value-of select="." />
137
				</div>
138
			</xsl:for-each>
139
		</xsl:if>
125 140
	</xsl:template>
126 141

  
127 142
	<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')]" />
143
		<xsl:if test="//dcx:dcTerms/dct:spatial!=''">
144
			<div class="row-fluid">
145
				<div data-content="geographicCoverage" class="row-fluid geographicCoverage">
146
					<h4>Geographic Region</h4>
147
					
148
					<xsl:if test="//dcx:dcTerms/dct:spatial[not(contains(@xsi:type, 'Box'))]!=''">
149
						<div data-content="geographicDescription" class="control-group geographicDescription">
150
							<label class="control-label">Geographic Description</label>
151
							<div class="controls">
152
								<xsl:for-each select="//dcx:dcTerms/dct:spatial[not(contains(@xsi:type, 'Box'))]">
153
									<div class="controls-well">
154
										<xsl:value-of select="." />
155
									</div>
156
								</xsl:for-each>
157
							</div>
158
						</div>
159
					</xsl:if>
160
					
161
					<div data-content="boundingCoordinates" class="control-group boundingCoordinates">
162
						<label class="control-label">Bounding Coordinates</label>
163
						<div class="controls controls-well">					
164
							<xsl:for-each select="//dcx:dcTerms/dct:spatial[contains(@xsi:type, 'Box')]">
165
								<xsl:call-template name="extract-coordinates" />
166
							</xsl:for-each>
167
						</div>	
136 168
					</div>
169
	
137 170
				</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 171
			</div>
149
		</div>
172
		</xsl:if>
150 173
	</xsl:template>
151 174

  
152 175
	<xsl:template name="extract-coordinates">
......
181 204
		<xsl:param name="corner" />
182 205
		<xsl:param name="label" />
183 206
		<xsl:param name="bound" />
184
		<xsl:variable name="coord"
185
			select="substring-before(substring-after($data,concat($corner,'=')),';')" />
207
		
208
		<xsl:variable name="coord">
209
			<xsl:choose>
210
				<xsl:when test="contains(substring-after($data,concat($corner,'=')), ';')">
211
					<xsl:value-of select="substring-before(substring-after($data,concat($corner,'=')), ';')" />
212
				</xsl:when>
213
				<xsl:otherwise>
214
					<xsl:value-of select="substring-after($data,concat($corner,'='))" />
215
				</xsl:otherwise>
216
			</xsl:choose>
217
		</xsl:variable>	
218
		
186 219
		<div data-value="{$coord}" data-content="{$bound}" class="control-group {$bound}">
187 220
			<label class="control-label">
188 221
				<xsl:value-of select="$label" />
......
222 255
	</xsl:template>
223 256

  
224 257
	<xsl:template name="temporal">
225
		<div class="row-fluid">
226
			<div data-content="temporalCoverage" class="row-fluid temporalCoverage">
227
				<h4>Temporal Coverage</h4>
228
				<div class="control-group">
229
					<xsl:if test="//dcx:dcTerms/dct:temporal[@xsi:type='Period']/text() != ''">
230
						<label class="control-label">Date Range</label>
231
						<div class="controls controls-well">					
232
							<xsl:for-each select="//dcx:dcTerms/dct:temporal[@xsi:type='Period']">
233
								<xsl:call-template name="extract-period" />
234
							</xsl:for-each>
235
						</div>	
236
					</xsl:if>
237
					<xsl:if test="//dcx:dcTerms/dct:temporal[not(@xsi:type='Period')]/text() != ''">
238
						<label class="control-label">Single Date</label>
239
						<div class="controls controls-well">					
258
		<xsl:if test="//dcx:dcTerms/dct:temporal!=''">
259
			<div class="row-fluid">
260
				<div data-content="temporalCoverage" class="row-fluid temporalCoverage">
261
					<h4>Temporal Coverage</h4>
262
					<div class="control-group">
263
						<xsl:if test="//dcx:dcTerms/dct:temporal[@xsi:type='Period']/text() != ''">
264
							<label class="control-label">Date Range</label>
265
							<div class="controls controls-well">					
266
								<xsl:for-each select="//dcx:dcTerms/dct:temporal[@xsi:type='Period']">
267
									<xsl:call-template name="extract-period" />
268
								</xsl:for-each>
269
							</div>	
270
						</xsl:if>
271
						<xsl:if test="//dcx:dcTerms/dct:temporal[not(@xsi:type='Period')]/text() != ''">
272
							<label class="control-label">Date(s)</label>
240 273
							<xsl:for-each select="//dcx:dcTerms/dct:temporal[not(@xsi:type='Period')]">
241
								<xsl:value-of select="." />
274
								<div class="controls controls-well">					
275
									<xsl:value-of select="." />
276
								</div>
242 277
							</xsl:for-each>
243
						</div>	
244
					</xsl:if>
278
						</xsl:if>
279
					</div>
245 280
				</div>
246 281
			</div>
247
		</div>
282
		</xsl:if>
248 283
	</xsl:template>
249 284

  
250 285
</xsl:stylesheet>

Also available in: Unified diff