-
Notifications
You must be signed in to change notification settings - Fork 1
/
dataciteToHTML.xslt
669 lines (627 loc) · 38.3 KB
/
dataciteToHTML.xslt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
<?xml version="1.0"?>
<!--
Document : dataciteToHTML.xsl. (version created from datadoi.xsl)
Original Created on : February 18, 2015, 11:49 AM
Author : vickiferrini
Description: XSLT to generate html for IEDA Data DOI landing page.
Repository : https://github.com/iedadata/resources
Updates
: May 26, 2017 Stephen Richard adapt for Datacite v4; use local names so is
version-agnostic. Only major change in v4 is geoLocation encoding
: 2018-02-05. Superseded by dataciteToHTMLwithSDO.xsl SMR
* @copyright 2007-2017 Interdisciplinary Earth Data Alliance, Columbia University. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License
-->
<xsl:stylesheet xmlns:k4="http://datacite.org/schema/kernel-4"
xmlns:k3="http://datacite.org/schema/kernel-3" xmlns:k2="http://datacite.org/schema/kernel-2.2"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<head>
<title>IEDA Data DOI</title>
<!-- <link rel="stylesheet" href="/doi/datadoi.css"/>-->
<link rel="stylesheet" href="http://get.iedadata.org/doi/datadoi.css"/>
<link rel="stylesheet" href="http://www.marine-geo.org/css/mapv3.css"/>
<link rel="stylesheet" type="text/css"
href="http://www.marine-geo.org/inc/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css"
media="all"/>
<script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyATYahozDIlFIM1mO7o66AocXi72mkPT18&sensor=false&libraries=drawing" type="text/javascript"/>
<script type="text/javascript" src="http://www.marine-geo.org/inc/jquery-1.9.1.js"/>
<script type="text/javascript" src="http://www.marine-geo.org/inc/jquery-ui-1.10.2.custom.min.js"/>
<script type="text/javascript" src="http://www.marine-geo.org/inc/basemap_v3.js"/>
<!-- <script type="text/javascript" src="/doi/doimap.js"/>-->
<script type="text/javascript" src="http://get.iedadata.org/doi/doimap.js"/>
</head>
<xsl:element name="body">
<xsl:choose>
<xsl:when test="//@alternateIdentifierType = 'CSDMS'">
<xsl:attribute name="onload">
<xsl:text>window.location.href='</xsl:text>
<xsl:text>http://csdms.colorado.edu/wiki/Model:</xsl:text>
<xsl:value-of select="//*[@alternateIdentifierType = 'CSDMS'][1]"/>
<xsl:text>'</xsl:text>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<div id="container">
<div>
<a href="http://www.iedadata.org">
<img onclick="http://www.iedadata.org"
src="http://get.iedadata.org/doi/ieda_logo_200x88.png"
alt="IEDA"/>
</a>
</div>
<h1>
<xsl:text>Data DOI: </xsl:text>
<xsl:value-of select="//*[local-name() = 'identifier']"/>
</h1>
<div id="right-side">
<xsl:apply-templates select="//k3:geoLocations"/>
<xsl:apply-templates select="//k4:geoLocations"/>
</div>
<div>
<!-- CITATION for resource -->
<div class="row">
<div class="title">
<xsl:text>Citation:</xsl:text>
</div>
<div class="description">
<xsl:value-of select="//*[local-name() = 'creatorName'][1]"/>
<xsl:variable name="thecount"
select="count(//*[local-name() = 'creatorName'])"/>
<xsl:if test="count(//*[local-name() = 'creatorName']) > 1">
<xsl:text>, et al., </xsl:text>
</xsl:if>
<xsl:text> (</xsl:text>
<xsl:value-of select="//*[local-name() = 'publicationYear']"/>
<!--<xsl:value-of select="substring(/k3:resource/k3:dates/k3:date[@dateType='Created'],1,4)"/> -->
<xsl:text>), </xsl:text>
<!-- will potentially have problems here if there are multiple titles; this just takes the first one -->
<xsl:value-of disable-output-escaping="yes"
select="//*[local-name() = 'title'][1]"/>
<xsl:text>. </xsl:text>
<xsl:variable name="thepublisher" select="//*[local-name() = 'publisher']"/>
<xsl:choose>
<xsl:when test="contains($thepublisher,'Integrated Earth Data Applications')">
<xsl:value-of select="string('Interdisciplinary Earth Data Alliance (IEDA)')"/>
</xsl:when>
<xsl:when test="contains(normalize-space($thepublisher),'EarthChem Library')">
<xsl:value-of select="string('Interdisciplinary Earth Data Alliance (IEDA)')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="normalize-space(string($thepublisher))"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>. doi:</xsl:text>
<xsl:value-of select="//*[local-name() = 'identifier']"/>
</div>
</div>
<!-- resource TITLE -->
<div class="row">
<div class="title">Title:</div>
<div class="description">
<xsl:for-each select="//*[local-name() = 'title']">
<div>
<xsl:if test="@titleType">
<xsl:value-of
select="normalize-space(string(@titleType))"/>
<xsl:text>: </xsl:text>
</xsl:if>
<xsl:value-of disable-output-escaping="yes"
select="normalize-space(string(.))"/>
</div>
</xsl:for-each>
</div>
</div>
<!-- resource DESCRIPTIONS -->
<xsl:if test="//*[local-name() = 'descriptions']">
<xsl:for-each select="//*[local-name() = 'description']">
<xsl:if test="string-length(normalize-space(string(.))) > 0 and
not(normalize-space(string(.)) = 'Related publications:')">
<div class="row">
<div class="title">
<xsl:choose>
<xsl:when test="@descriptionType = 'Other'">
<xsl:value-of select="string('Other Description')"/>
</xsl:when>
<xsl:when test="@descriptionType">
<xsl:value-of disable-output-escaping="yes"
select="normalize-space(string(@descriptionType))"/>
</xsl:when>
<!-- no description type property -->
<xsl:otherwise>
<xsl:value-of select="string('Description')"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>: </xsl:text>
</div>
<div class="description">
<xsl:value-of disable-output-escaping="yes"
select="normalize-space(string(.))"/>
</div>
</div>
</xsl:if>
</xsl:for-each>
</xsl:if>
<!-- resource CREATORS -->
<div class="row">
<div class="title">
<xsl:text>Creator(s):</xsl:text>
</div>
<div class="description">
<xsl:for-each select="//*[local-name() = 'creator']">
<div>
<xsl:value-of disable-output-escaping="yes"
select="normalize-space(string(*[local-name() = 'creatorName']))"/>
<xsl:for-each
select="*[local-name() = 'affiliation']">
<xsl:text>, </xsl:text>
<xsl:value-of disable-output-escaping="yes" select="normalize-space(string(.))"/>
</xsl:for-each>
<xsl:for-each select="*[local-name() = 'nameIdentifier']">
<xsl:choose>
<xsl:when test="@nameIdentifierScheme = 'SCOPUS'">
<xsl:text>; ScopusID:</xsl:text>
<a
href="https://www.scopus.com/authid/detail.uri?authorId={.}">
<xsl:value-of select="."/>
</a>
</xsl:when>
<xsl:when test="@nameIdentifierScheme = 'ORCID'">
<xsl:text>; ORCID:</xsl:text>
<a
href="https://orcid.org/{.}">
<xsl:value-of select="."/>
</a>
</xsl:when>
<xsl:when test="(@nameIdentifierScheme = 'e-mail address')
or contains(.,'mailto:')" >
<xsl:choose>
<xsl:when test="contains(.,'mailto:')">
<xsl:text>; e-mail: </xsl:text>
<xsl:value-of select="substring(.,8)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('; e-mail: ',.)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<!-- handle other possible schemes, but not MGDS or UTIG, which simply echo
creator name with different syntax -->
<xsl:when test="(@nameIdentifierScheme
and not(string(@nameIdentifierScheme)='MGDS')
and not(string(@nameIdentifierScheme)='UTIG')
and not(contains(string(.),'urn'))
) ">
<xsl:text>, </xsl:text>
<xsl:value-of select="normalize-space(string(@nameIdentifierScheme))" />
<xsl:text>--</xsl:text>
<xsl:value-of select="."/>
</xsl:when>
</xsl:choose>
<!-- no schemeURIs at this point so don't need to handle -->
</xsl:for-each>
</div>
</xsl:for-each>
</div>
</div>
<!-- resource Available DATE -->
<xsl:if test="//*[local-name() = 'date'][@dateType='Available']">
<div class="row">
<div class="title">
<xsl:text>Date Available:</xsl:text>
</div>
<div class="description">
<xsl:value-of select="//*[local-name() = 'date'][@dateType='Available'][1]"/>
</div>
</div>
</xsl:if>
<!-- resource Created DATE -->
<xsl:if test="//*[local-name() = 'date'][@dateType='Created']">
<div class="row">
<div class="title">
<xsl:text>Date Created:</xsl:text>
</div>
<div class="description">
<xsl:value-of select="//*[local-name() = 'date'][@dateType='Created'][1]"/>
</div>
</div>
</xsl:if>
<!-- resource update DATE -->
<!-- if update date is same as create date, don't show -->
<xsl:if test="(//*[local-name() = 'date'][@dateType='Updated'])
and not(contains(normalize-space(//*[local-name() = 'date'][@dateType='Updated'][1]),
substring(normalize-space(//*[local-name() = 'date'][@dateType='Created'][1]),1,10)))">
<div class="row">
<div class="title">
<xsl:text>Date Updated:</xsl:text>
</div>
<div class="description">
<xsl:value-of select="//*[local-name() = 'date'][@dateType='Updated'][1]"/>
</div>
</div>
</xsl:if>
<!-- resource KEYWORDS -->
<xsl:if test="(//*[local-name() = 'subject'][not(@subjectScheme='MGDS')])">
<div class="row">
<div class="title">
<xsl:text>Keyword(s):</xsl:text>
</div>
<xsl:for-each select="//*[local-name() = 'subject']">
<xsl:if test="string-length(.)>0">
<div class="description">
<xsl:value-of select="normalize-space(string(.))"/>
<xsl:if test="@xml:lang">
<xsl:text>@</xsl:text>
<xsl:value-of
select="normalize-space(string(@xml:lang))"/>
</xsl:if>
<xsl:if test="@subjectScheme">
<xsl:text> (</xsl:text>
<xsl:value-of
select="normalize-space(string(@subjectScheme))"/>
<xsl:text>)</xsl:text>
</xsl:if>
<xsl:if test="@schemeURI">
<xsl:text>; ID scheme URI--</xsl:text>
<xsl:value-of
select="normalize-space(string(@schemeURI))"/>
</xsl:if>
<xsl:if test="@valueIRI">
<xsl:text> (value IRI: </xsl:text>
<xsl:value-of
select="normalize-space(string(@valueIRI))"/>
<xsl:text>)</xsl:text>
</xsl:if>
</div>
</xsl:if>
</xsl:for-each>
<!-- show geoLocationPlace names as geographic keywords -->
<xsl:for-each select="//*[local-name() = 'geoLocationPlace']">
<xsl:if test="string-length(.)>1">
<div class="description">
<xsl:value-of select="normalize-space(string(.))"/>
<xsl:text> (geographic location)</xsl:text>
</div>
</xsl:if>
</xsl:for-each>
</div>
</xsl:if>
<!-- resource MGDS DATA TYPES -->
<xsl:if test="//*[@subjectScheme='MGDS']">
<div class="row">
<div class="title">
<xsl:text>Data Type(s):</xsl:text>
</div>
<xsl:for-each select="//*[local-name() = 'subject']">
<div class="description">
<xsl:value-of select="normalize-space(string(.))"/>
</div>
</xsl:for-each>
</div>
</xsl:if>
<!-- resource RESOURCE TYPE -->
<xsl:for-each select="//*[local-name() = 'resourceType']">
<div class="row">
<div class="title">
<xsl:text>Resource Type:</xsl:text>
</div>
<div class="description">
<div>
<xsl:value-of select="@resourceTypeGeneral"/>
<xsl:if test="string(.) and
not(normalize-space(string(.))=normalize-space(string(@resourceTypeGeneral)))">
<xsl:text> -- </xsl:text>
<xsl:value-of select="string(.)"/>
</xsl:if>
</div>
</div>
</div>
</xsl:for-each>
<!-- resource FORMAT -->
<xsl:if test="//*[local-name() = 'format']">
<div class="row">
<div class="title">
<xsl:text>File Format(s):</xsl:text>
</div>
<xsl:for-each select="//*[local-name() = 'format']">
<div class="description">
<xsl:value-of select="normalize-space(string(.))"/>
</div>
</xsl:for-each>
</div>
</xsl:if>
<!-- resource CURATOR-alternate Identifier -->
<xsl:for-each select="//*[local-name() = 'alternateIdentifier']">
<xsl:call-template name="altIDHandler"/>
</xsl:for-each>
<!-- resource VERSION -->
<xsl:if test="//*[local-name() = 'version']">
<div class="row">
<div class="title">
<xsl:text>Version:</xsl:text>
</div>
<div class="description">
<div>
<xsl:value-of disable-output-escaping="yes"
select="normalize-space(string(//*[local-name() = 'version']))"
/>
</div>
</div>
</div>
</xsl:if>
<!-- resource LANGUAGE -->
<xsl:if test="//*[local-name() = 'language']">
<div class="row">
<div class="title">
<xsl:text>Language: </xsl:text>
</div>
<div class="description">
<div>
<xsl:value-of disable-output-escaping="yes"
select="normalize-space(string(//*[local-name() = 'language']))"
/>
</div>
</div>
</div>
</xsl:if>
<!-- resource USE LIMITATIONS and LICENSE -->
<xsl:if test="//*[local-name() = 'rights']">
<div class="row">
<div class="title">
<xsl:text>License:</xsl:text>
</div>
<xsl:for-each select="//*[local-name() = 'rights']">
<div class="description">
<div>
<xsl:value-of disable-output-escaping="yes"
select="normalize-space(string(.))"/>
<xsl:if test="@rightsURI">
<xsl:text> URI: </xsl:text>
<xsl:value-of disable-output-escaping="yes"
select="normalize-space(string(@rightsURI))"/>
</xsl:if>
</div>
</div>
</xsl:for-each>
</div>
</xsl:if>
</div>
<div style="clear:both"/>
<!-- RELATED RESOURCES -->
<xsl:if test="//*[local-name() = 'relatedIdentifier']">
<h1>
<xsl:text>Related Information</xsl:text>
</h1>
<xsl:for-each select="//*[local-name() = 'relatedIdentifier']">
<xsl:call-template name="relIDHandler"/>
</xsl:for-each>
</xsl:if>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</html>
</xsl:template>
<xsl:template name="relIDHandler">
<xsl:if test="string-length(.)>1 and not(contains(.,'nknown'))
and not(contains(.,'group:'))">
<div class="row">
<div class="title">
<xsl:value-of select="./@relationType"/>
<xsl:text>:</xsl:text>
</div>
<xsl:choose>
<xsl:when test="@relatedIdentifierType = 'URL'">
<div class="description"> url: <a href="{.}">
<xsl:value-of select="."/>
</a>
</div>
</xsl:when>
<xsl:when test="@relatedIdentifierType = 'DOI'">
<div class="description"> doi: <a href="http://dx.doi.org/{.}">
<xsl:value-of select="."/>
</a>
</div>
</xsl:when>
<xsl:when test="@relatedIdentifierType = 'ISBN'">
<div class="description"> isbn: <a
href="http://www.worldcat.org/search?qt=wikipedia&q=isbn%3A{.}">
<xsl:value-of select="."/>
</a>
</div>
</xsl:when>
<xsl:when test="@relatedIdentifierType = 'IGSN'">
<div class="description"> Sample ID: <a
href="https://app.geosamples.org/sample/igsn/{substring(.,string-length('igsn:')+1)}">
<xsl:value-of select="."/>
</a>
</div>
</xsl:when>
<xsl:otherwise>
<div class="description">
<xsl:choose>
<!-- this test was moved outside the div so we don't get the relType in output
but leave here to allow for otehr special cases to be handled-->
<xsl:when test="contains(.,'group:') ">
<!--<xsl:value-of select="substring-after(., 'group:')"/>-->
<!-- don't report the 'grouping', its for internal purposes -->
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@relatedIdentifierType"/>
<xsl:text>: </xsl:text>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:if>
</xsl:template>
<xsl:template name="altIDHandler">
<xsl:param name="theAltID"/>
<xsl:choose>
<xsl:when test="@alternateIdentifierType = 'MGDS'">
<div class="row" style="min-height:36px;">
<div class="title">
<xsl:text>Data Curated by:</xsl:text>
</div>
<div class="description">
<a href="http://www.marine-geo.org">
<xsl:text>Marine Geoscience Data System (MGDS)</xsl:text>
</a>
</div>
<button type="button" class="btn"
onclick="window.location='http://www.marine-geo.org/tools/files/{.}'"> Download
Data </button>
<div style="clear:both"/>
</div>
</xsl:when>
<xsl:when test="contains(string(.),'earthchem.org')">
<div class="row" style="min-height:36px;">
<div class="title">
<xsl:text>Data Curated by:</xsl:text>
</div>
<div class="description">
<a href="http://www.earthchem.org/library">
<xsl:text>EarthChem Library (ECL) </xsl:text>
</a>
</div>
<button type="button" class="btn" onclick="window.location='{.}'"> Download Data </button>
<div style="clear:both"/>
</div>
</xsl:when>
<xsl:when test="(@alternateIdentifierType = 'URL') and (//*[local-name()='publisher'])">
<div class="row" style="min-height:36px;">
<div class="title">
<xsl:text>Data Curated by:</xsl:text>
</div>
<div class="description">
<xsl:value-of select="//*[local-name()='publisher']"/>
<xsl:text>- </xsl:text>
</div>
<button type="button" class="btn" onclick="window.location='{.}'"> Download Data </button>
<div style="clear:both"/>
</div>
</xsl:when>
<xsl:when test="@alternateIdentifierType = 'UTIG'">
<div class="row" style="min-height:36px;">
<div class="title">
<xsl:text>Data Curated by:</xsl:text>
</div>
<div class="description">
<a href="http://www-udc.ig.utexas.edu/sdc/">
<xsl:text>Academic Seismic Portal @ UTIG </xsl:text>
</a>
</div>
<button type="button" class="btn"
onclick="window.location='http://www-udc.ig.utexas.edu/sdc/DOI/datasetDOI.php?datasetuID={.}'"
> Download Data </button>
<div style="clear:both"/>
</div>
</xsl:when>
<xsl:otherwise>
<!-- filter out identifiers we don't want to display -->
<xsl:if test="not(contains(string(.),'urn:grl:submission'))">
<div class="row">
<div class="title">
<xsl:text>Alternate Identifier:</xsl:text>
</div>
<div class="description">
<xsl:value-of select="@alternateIdentifierType"/>
<xsl:text>: </xsl:text>
<xsl:value-of select="."/>
</div>
</div>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="k3:geoLocations">
<form id="geoLocations">
<xsl:apply-templates select="k3:geoLocation"/>
</form>
<div id="mapc"/>
</xsl:template>
<xsl:template match="k3:geoLocation">
<xsl:choose>
<xsl:when test="./k3:geoLocationPoint">
<xsl:element name="input">
<xsl:attribute name="class">
<xsl:text>geoLocationPoint</xsl:text>
</xsl:attribute>
<xsl:attribute name="type">
<xsl:text>hidden</xsl:text>
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="./k3:geoLocationPoint"/>
</xsl:attribute>
</xsl:element>
</xsl:when>
<xsl:when test="./k3:geoLocationBox">
<xsl:element name="input">
<xsl:attribute name="class">
<xsl:text>geoLocationBox</xsl:text>
</xsl:attribute>
<xsl:attribute name="type">
<xsl:text>hidden</xsl:text>
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="./k3:geoLocationBox"/>
</xsl:attribute>
</xsl:element>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="k4:geoLocations">
<form id="geoLocations">
<xsl:apply-templates select="k4:geoLocation"/>
</form>
<div id="mapc"/>
</xsl:template>
<xsl:template match="k4:geoLocation">
<xsl:choose>
<xsl:when test="./k4:geoLocationPoint">
<xsl:element name="input">
<xsl:attribute name="class">
<xsl:text>geoLocationPoint</xsl:text>
</xsl:attribute>
<xsl:attribute name="type">
<xsl:text>hidden</xsl:text>
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="./k4:geoLocationPoint/k4:pointLatitude"/>
<xsl:text> </xsl:text>
<xsl:value-of select="./k4:geoLocationPoint/k4:pointLongitude"/>
</xsl:attribute>
</xsl:element>
</xsl:when>
<xsl:when test="./k4:geoLocationBox">
<xsl:element name="input">
<xsl:attribute name="class">
<xsl:text>geoLocationBox</xsl:text>
</xsl:attribute>
<xsl:attribute name="type">
<xsl:text>hidden</xsl:text>
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="./k4:geoLocationBox/k4:southBoundLatitude"/>
<xsl:text> </xsl:text>
<xsl:value-of select="./k4:geoLocationBox/k4:westBoundLongitude"/>
<xsl:text> </xsl:text>
<xsl:value-of select="./k4:geoLocationBox/k4:northBoundLatitude"/>
<xsl:text> </xsl:text>
<xsl:value-of select="./k4:geoLocationBox/k4:eastBoundLongitude"/>
</xsl:attribute>
</xsl:element>
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>