Project

General

Profile

metacat / lib / style / skins / metacatui / eml-2 / eml-dataset.xsl @ 7987

1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Matt Jones
5
  *    Copyright: 2000 Regents of the University of California and the
6
  *               National Center for Ecological Analysis and Synthesis
7
  *  For Details: http://www.nceas.ucsb.edu/
8
  *
9
  *   '$Author: leinfelder $'
10
  *     '$Date: 2013-07-15 14:17:45 -0700 (Mon, 15 Jul 2013) $'
11
  * '$Revision: 7987 $'
12
  *
13
  * This program is free software; you can redistribute it and/or modify
14
  * it under the terms of the GNU General Public License as published by
15
  * the Free Software Foundation; either version 2 of the License, or
16
  * (at your option) any later version.
17
  *
18
  * This program is distributed in the hope that it will be useful,
19
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
  * GNU General Public License for more details.
22
  *
23
  * You should have received a copy of the GNU General Public License
24
  * along with this program; if not, write to the Free Software
25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
  *
27
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
28
  * convert an XML file that is valid with respect to the eml-dataset.dtd
29
  * module of the Ecological Metadata Language (EML) into an HTML format
30
  * suitable for rendering with modern web browsers.
31
-->
32
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
33

    
34

    
35
  <xsl:output method="html" encoding="iso-8859-1"
36
    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
37
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
38
    indent="yes" />  
39

    
40
  <xsl:template match="dataset" mode="dataset">
41
      <xsl:choose>
42
         <xsl:when test="references!=''">
43
          <xsl:variable name="ref_id" select="references"/>
44
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
45
          <xsl:for-each select="$references">
46
             <xsl:call-template name="datasetmixed"/>
47
          </xsl:for-each>
48
       </xsl:when>
49
       <xsl:otherwise>
50
             <xsl:call-template name="datasetmixed"/>
51
       </xsl:otherwise>
52
      </xsl:choose>
53

    
54
  </xsl:template>
55
  
56
  <xsl:template name="datasetmixed">
57
	
58
     <!-- citation -->
59
	<xsl:for-each select=".">
60
		<xsl:call-template name="datasetcitation" />
61
    </xsl:for-each>		
62
     
63
     <h4>General</h4>
64
             <!-- put in the title -->
65
             <xsl:if test="./title">
66
               <xsl:for-each select="./title">
67
                 <xsl:call-template name="resourcetitle">
68
                   <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
69
                   <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
70
                 </xsl:call-template>
71
               </xsl:for-each>
72
             </xsl:if>
73
             <!-- put in the short name -->
74
             <xsl:if test="shortName">
75
             <xsl:for-each select="./shortName">
76
             <xsl:call-template name="resourceshortName">
77
               <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
78
               <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
79
             </xsl:call-template>
80
             </xsl:for-each>
81
             </xsl:if>
82
             <!-- put in the identifier and system that the ID belongs to -->
83
             <xsl:if test="../@packageId">
84
             <xsl:for-each select="../@packageId">
85
             	<xsl:choose>
86
             		<xsl:when test="$docid != ''" >
87
             			<!-- use docid parameter when we have it -->         	
88
						<xsl:call-template name="identifier">
89
							<xsl:with-param name="packageID" select="$docid"/>
90
							<xsl:with-param name="system" select="../@system"/>
91
							<xsl:with-param name="IDfirstColStyle" select="$firstColStyle"/>
92
							<xsl:with-param name="IDsecondColStyle" select="$secondColStyle"/>
93
						</xsl:call-template>
94
		             </xsl:when>
95
		             <xsl:otherwise>
96
		             	<xsl:call-template name="identifier">
97
			               <xsl:with-param name="packageID" select="../@packageId"/>
98
			               <xsl:with-param name="system" select="../@system"/>
99
			               <xsl:with-param name="IDfirstColStyle" select="$firstColStyle"/>
100
			               <xsl:with-param name="IDsecondColStyle" select="$secondColStyle"/>
101
			             </xsl:call-template>
102
		             </xsl:otherwise>
103
	             </xsl:choose>
104
             </xsl:for-each>
105
             </xsl:if>
106
             <!-- put in the alternate identifiers -->
107
             <xsl:if test="keywordSet">
108
             <xsl:for-each select="alternateIdentifier">
109
               <xsl:call-template name="resourcealternateIdentifier">
110
                 <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
111
                 <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
112
               </xsl:call-template>
113
             </xsl:for-each>
114
             </xsl:if>
115
             <!-- put in the text of the abstract-->
116
             <xsl:if test="./abstract">
117
             <xsl:for-each select="./abstract">
118
               <xsl:call-template name="resourceabstract">
119
                 <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
120
                 <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
121
               </xsl:call-template>
122
             </xsl:for-each>
123
             </xsl:if>
124
             <!-- put in the purpose of the dataset-->
125
             <xsl:if test="./purpose">
126
             <xsl:for-each select="./purpose">
127
               <xsl:call-template name="datasetpurpose">
128
                 <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
129
                 <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
130
               </xsl:call-template>
131
             </xsl:for-each>
132
             </xsl:if>
133
             <!-- put in the keyword sets -->
134
             <xsl:if test="keywordSet">
135
             	<div class="row-fluid">
136
					<div class="control-group">
137
						<label class="control-label">
138
							<xsl:text>Keywords:</xsl:text>
139
						</label>	
140
						<div class="controls controls-well">
141
							<xsl:for-each select="keywordSet">
142
								<xsl:call-template name="resourcekeywordSet" >
143
									<xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
144
									<xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
145
								</xsl:call-template>
146
							</xsl:for-each>
147
						</div>
148
					</div>	
149
				</div>
150
             </xsl:if>
151

    
152
             <!-- put in the publication date -->
153
             <xsl:if test="./pubDate">
154
               <xsl:for-each select="pubDate">
155
                <xsl:call-template name="resourcepubDate" >
156
                  <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
157
                 </xsl:call-template>
158
               </xsl:for-each>
159
             </xsl:if>
160

    
161
             <!-- put in the language -->
162
             <xsl:if test="./language">
163
               <xsl:for-each select="language">
164
                 <xsl:call-template name="resourcelanguage" >
165
                   <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
166
                  </xsl:call-template>
167
               </xsl:for-each>
168
             </xsl:if>
169

    
170
             <!-- put in the series -->
171
             <xsl:if test="./series">
172
               <xsl:for-each select="series">
173
                 <xsl:call-template name="resourceseries" >
174
                   <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
175
                 </xsl:call-template>
176
               </xsl:for-each>
177
             </xsl:if>
178
             
179
         
180
         
181
           <!-- create a second easy access table listing the data entities -->
182
           <xsl:if test="dataTable|spatialRaster|spatialVector|storedProcedure|view|otherEntity">
183
			<xsl:if test="$withEntityLinks='1' or $displaymodule = 'printall'">
184
	             <xsl:call-template name="datasetentity"/>
185
			</xsl:if>
186
           </xsl:if>
187
           
188

    
189
     
190
     <h3>Involved Parties</h3>
191

    
192
     <!-- this section creates a two column table to present the involved
193
     parties in boxes across the entire page -->
194
     <table class="subGroup onehundred_percent">
195

    
196
       <!-- add in the creators using a two column table -->
197
       <xsl:if test="creator">
198
         <tr><th colspan="2">Data Set Creators:</th></tr>
199
         <xsl:for-each select="creator">
200
         <tr>
201
           <xsl:if test="position() mod 2 = 1">
202
             <td class="fortyfive_percent">
203
               <xsl:call-template name="party">
204
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
205
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
206
               </xsl:call-template>
207
             </td>
208
             <xsl:for-each select="following-sibling::creator[position()=1]">
209
             <td class="fortyfive_percent">
210
               <xsl:call-template name="party">
211
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
212
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
213
               </xsl:call-template>
214
             </td>
215
             </xsl:for-each>
216
           </xsl:if>
217
         </tr>
218
         </xsl:for-each>
219
       </xsl:if>
220

    
221
       <!-- add in the contacts using a two column table -->
222
       <xsl:if test="contact">
223
         <tr><th colspan="2">Data Set Contacts:</th></tr>
224
         <xsl:for-each select="contact">
225
         <tr>
226
           <xsl:if test="position() mod 2 = 1">
227
             <td class="fortyfive_percent">
228
               <xsl:call-template name="party">
229
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
230
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
231
               </xsl:call-template>
232
             </td>
233
             <xsl:for-each select="following-sibling::contact[position()=1]">
234
             <td class="fortyfive_percent">
235
               <xsl:call-template name="party">
236
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
237
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
238
               </xsl:call-template>
239
             </td>
240
             </xsl:for-each>
241
           </xsl:if>
242
         </tr>
243
         </xsl:for-each>
244
       </xsl:if>
245

    
246
       <!-- add in the associatedParty using a two column table -->
247
       <xsl:if test="associatedParty">
248
         <tr><th colspan="2">Associated Parties:</th></tr>
249
         <xsl:for-each select="associatedParty">
250
         <tr>
251
           <xsl:if test="position() mod 2 = 1">
252
             <td class="fortyfive_percent">
253
               <xsl:call-template name="party">
254
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
255
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
256
               </xsl:call-template>
257
             </td>
258
             <xsl:for-each select="following-sibling::associatedParty[position()=1]">
259
             <td class="fortyfive_percent">
260
               <xsl:call-template name="party">
261
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
262
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
263
               </xsl:call-template>
264
             </td>
265
             </xsl:for-each>
266
           </xsl:if>
267
         </tr>
268
         </xsl:for-each>
269
       </xsl:if>
270

    
271
       <!-- add in the metadataProviders using a two column table -->
272
       <xsl:if test="metadataProvider">
273
         <tr><th colspan="2">Metadata Providers:</th></tr>
274
         <xsl:for-each select="metadataProvider">
275
         <tr>
276
           <xsl:if test="position() mod 2 = 1">
277
             <td class="fortyfive_percent">
278
               <xsl:call-template name="party">
279
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
280
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
281
               </xsl:call-template>
282
             </td>
283
             <xsl:for-each select="following-sibling::metadataProvider[position()=1]">
284
             <td class="fortyfive_percent">
285
               <xsl:call-template name="party">
286
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
287
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
288
               </xsl:call-template>
289
             </td>
290
             </xsl:for-each>
291
           </xsl:if>
292
         </tr>
293
         </xsl:for-each>
294
       </xsl:if>
295

    
296
       <!-- add in the publishers using a two column table -->
297
       <xsl:if test="publisher">
298
         <tr><th colspan="2">Data Set Publishers:</th></tr>
299
         <xsl:for-each select="publisher">
300
         <tr>
301
           <xsl:if test="position() mod 2 = 1">
302
             <td class="fortyfive_percent">
303
               <xsl:call-template name="party">
304
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
305
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
306
               </xsl:call-template>
307
             </td>
308
             <xsl:for-each select="following-sibling::publisher[position()=1]">
309
             <td class="fortyfive_percent">
310
               <xsl:call-template name="party">
311
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
312
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
313
               </xsl:call-template>
314
             </td>
315
             </xsl:for-each>
316
           </xsl:if>
317
         </tr>
318
         </xsl:for-each>
319
       </xsl:if>
320
     </table>
321

    
322
     <h3>Data Set Characteristics</h3>
323

    
324
       <!-- add in the coverage info -->
325
     <table class="subGroup onehundred_percent">  
326
       <tr>
327
       <!-- add in the geographic coverage info -->
328
         <td class="fortyfive_percent">
329
           <xsl:if test="./coverage/geographicCoverage">
330
             <xsl:for-each select="./coverage/geographicCoverage">
331
               <xsl:call-template name="geographicCoverage">
332
                 <xsl:with-param name="firstColStyle" select="$firstColStyle"/>
333
                 <xsl:with-param name="secondColStyle" select="$secondColStyle"/>
334
               </xsl:call-template>
335
             </xsl:for-each>
336
           </xsl:if>
337
         </td>
338
       <!-- add in the temporal coverage info -->
339
         <td class="fortyfive_percent">
340
           <xsl:if test="./coverage/temporalCoverage">
341
             <xsl:for-each select="./coverage/temporalCoverage">
342
               <xsl:call-template name="temporalCoverage">
343
                 <xsl:with-param name="firstColStyle" select="$firstColStyle"/>
344
                 <xsl:with-param name="secondColStyle" select="$secondColStyle"/>
345
               </xsl:call-template>
346
             </xsl:for-each>
347
           </xsl:if>
348
         </td>
349
       </tr>
350
       <tr>
351
       <!-- add in the taxonomic coverage info -->
352
         <td colspan="2" class="onehundred_percent">
353
           <xsl:if test="./coverage/taxonomicCoverage">
354
             <xsl:for-each select="./coverage/taxonomicCoverage">
355
               <xsl:call-template name="taxonomicCoverage">
356
                 <xsl:with-param name="firstColStyle" select="$firstColStyle"/>
357
                 <xsl:with-param name="secondColStyle" select="$secondColStyle"/>
358
               </xsl:call-template>
359
             </xsl:for-each>
360
           </xsl:if>
361
         </td>
362
       </tr>
363
     </table>
364

    
365
     <!-- add in the method info -->
366
     <h3>Sampling, Processing and Quality Control Methods</h3>
367

    
368
     <table class="subGroup onehundred_percent">  
369
       <tr>
370
         <td colspan="2" class="onehundred_percent">
371
           <xsl:if test="./methods">
372
             <xsl:for-each select="./methods">
373
               <xsl:call-template name="datasetmethod">
374
                 <xsl:with-param name="methodfirstColStyle" select="$firstColStyle"/>
375
                 <xsl:with-param name="methodsecondColStyle" select="$secondColStyle"/>
376
               </xsl:call-template>
377
             </xsl:for-each>
378
           </xsl:if>
379
         </td>
380
       </tr>
381
     </table>
382

    
383
     <h3>Data Set Usage Rights</h3>
384

    
385
       <!-- add in the intellectiual rights info -->
386
     <table class="subGroup onehundred_percent">  
387
       <tr>
388
         <td>
389
           <xsl:if test="intellectualRights">
390
             <xsl:for-each select="intellectualRights">
391
               <xsl:call-template name="resourceintellectualRights">
392
                 <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
393
                 <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
394
               </xsl:call-template>
395
             </xsl:for-each>
396
           </xsl:if>
397
         </td>
398
       </tr>
399
     </table>
400

    
401
       <!-- add in the access control info -->
402
     <table class="subGroup onehundred_percent">  
403
       <tr>
404
         <td>
405
           <xsl:if test="access">
406
             <xsl:for-each select="access">
407
               <xsl:call-template name="access">
408
                 <xsl:with-param name="accessfirstColStyle" select="$firstColStyle"/>
409
                 <xsl:with-param name="accesssecondColStyle" select="$secondColStyle"/>
410
               </xsl:call-template>
411
             </xsl:for-each>
412
           </xsl:if>
413
         </td>
414
       </tr>
415
     </table>
416
  </xsl:template>
417

    
418
  <xsl:template name="datasetresource">
419
     <tr>
420
        <td colspan="2">
421
          <xsl:call-template name="resource">
422
            <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
423
            <xsl:with-param name="ressubHeaderStyle" select="$subHeaderStyle"/>
424
          </xsl:call-template>
425
       </td>
426
     </tr>
427
  </xsl:template>
428

    
429

    
430

    
431
  <xsl:template name="datasetpurpose">
432
    <xsl:for-each select="purpose">
433
      <tr><td colspan="2">
434
           <xsl:text>Purpose:</xsl:text>
435
        </td>
436
       </tr>
437
       <tr>
438
            <td  class="{$firstColStyle}">
439
            &#160;
440
            </td>
441
            <td>
442
              <xsl:call-template name="text">
443
                <xsl:with-param name="textfirstColStyle" select="$firstColStyle"/>
444
              </xsl:call-template>
445
            </td>
446
       </tr>
447
     </xsl:for-each>
448
  </xsl:template>
449

    
450
  <xsl:template name="datasetmaintenance">
451
    <xsl:for-each select="maintenance">
452
      <tr><td colspan="2">
453
        <xsl:text>Maintenance:</xsl:text>
454
     </td></tr>
455
     <xsl:call-template name="mantenancedescription"/>
456
      <tr>
457
          <td  class="{$firstColStyle}">
458
          Frequency:
459
          </td>
460
          <td class="{$secondColStyle}" >
461
           <xsl:value-of select="maintenanceUpdateFrequency"/>
462
          </td>
463
     </tr>
464
     <xsl:call-template name="datasetchangehistory"/>
465
   </xsl:for-each>
466
  </xsl:template>
467

    
468
  <xsl:template name="mantenancedescription">
469
   <xsl:for-each select="description">
470
     <tr>
471
          <td  class="{$firstColStyle}">
472
          Description:
473
          </td>
474
          <td>
475
            <xsl:call-template name="text">
476
               <xsl:with-param name="textfirstColStyle" select="$firstColStyle"/>
477
             </xsl:call-template>
478
          </td>
479
     </tr>
480
    </xsl:for-each>
481
  </xsl:template>
482

    
483
   <xsl:template name="datasetchangehistory">
484
   <xsl:if test="changeHistory">
485
     <tr>
486
          <td class="{$firstColStyle}">
487
          History:
488
          </td>
489
          <td>
490
            <table class="{$tabledefaultStyle}">
491
              <xsl:for-each select="changeHistory">
492
                <xsl:call-template name="historydetails"/>
493
              </xsl:for-each>
494
            </table>
495
          </td>
496
     </tr>
497
     </xsl:if>
498
   </xsl:template>
499

    
500
   <xsl:template name="historydetails">
501
        <tr><td class="{$firstColStyle}">
502
            scope:</td>
503
            <td class="{$secondColStyle}">
504
            <xsl:value-of select="changeScope"/>
505
        </td></tr>
506
        <tr><td class="{$firstColStyle}">
507
            old value:</td>
508
            <td class="{$secondColStyle}">
509
            <xsl:value-of select="oldValue"/>
510
        </td></tr>
511
        <tr><td class="{$firstColStyle}">
512
            change date:</td>
513
            <td class="{$secondColStyle}">
514
            <xsl:value-of select="changeDate"/>
515
        </td></tr>
516
        <xsl:if test="comment and normalize-space(comment)!=''">
517
          <tr><td class="{$firstColStyle}">
518
            comment:</td><td class="{$secondColStyle}">
519
            <xsl:value-of select="comment"/>
520
          </td></tr>
521
        </xsl:if>
522
  </xsl:template>
523

    
524
  <xsl:template name="datasetcontact">
525
    <tr><td colspan="2">
526
        <xsl:text>Contact:</xsl:text>
527
     </td></tr>
528
    <xsl:for-each select="contact">
529
     <tr><td colspan="2">
530
       <xsl:call-template name="party">
531
              <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
532
       </xsl:call-template>
533
     </td></tr>
534
    </xsl:for-each>
535
  </xsl:template>
536

    
537
  <xsl:template name="datasetpublisher">
538
   <xsl:for-each select="publisher">
539
     <tr><td colspan="2">
540
        <xsl:text>Publisher:</xsl:text>
541
     </td></tr>
542
     <tr><td colspan="2">
543
       <xsl:call-template name="party">
544
              <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
545
       </xsl:call-template>
546
     </td></tr>
547
   </xsl:for-each>
548
  </xsl:template>
549

    
550
  <xsl:template name="datasetpubplace">
551
    <xsl:for-each select="pubPlace">
552
      <tr><td class="{$firstColStyle}">
553
           Publish Place:</td>
554
          <td class="{$secondColStyle}">
555
          <xsl:value-of select="."/>
556
          </td>
557
      </tr>
558
   </xsl:for-each>
559
  </xsl:template>
560

    
561
  <xsl:template name="datasetmethod">
562
     <xsl:for-each select=".">
563
        <xsl:call-template name="method">
564
          <xsl:with-param name="methodfirstColStyle" select="$firstColStyle"/>
565
        </xsl:call-template>
566
    </xsl:for-each>
567
  </xsl:template>
568

    
569
  <xsl:template name="datasetproject">
570
    <xsl:for-each select="project">
571
     <tr>
572
       <td colspan="2">
573
         <h3><xsl:text>Parent Project Information:</xsl:text></h3>
574
       </td>
575
     </tr>
576
     <tr>
577
       <td colspan="2">
578
       <xsl:call-template name="project">
579
         <xsl:with-param name="projectfirstColStyle" select="$firstColStyle"/>
580
       </xsl:call-template>
581
       </td>
582
     </tr>
583
    </xsl:for-each>
584
  </xsl:template>
585

    
586
   <xsl:template name="datasetaccess">
587
    <xsl:for-each select="access">
588
      <tr>
589
        <td colspan="2">
590
        <xsl:call-template name="access">
591
          <xsl:with-param name="accessfirstColStyle" select="$firstColStyle"/>
592
          <xsl:with-param name="accesssubHeaderStyle" select="$subHeaderStyle"/>
593
        </xsl:call-template>
594
        </td>
595
      </tr>
596
    </xsl:for-each>
597
  </xsl:template>
598
  
599
	<xsl:template name="datasetentity">
600
		<xsl:if test="dataTable or spatialRaster or spatialVector or storedProcedures or view or otherEntity">
601
			<h4>
602
				<xsl:text>Data Table, Image, and Other Data Details:</xsl:text>
603
			</h4>
604
		</xsl:if>
605
		
606
		<xsl:call-template name="xml" />
607
			
608
		<xsl:choose>
609
			<xsl:when test="$displaymodule!='printall'">
610
				<xsl:for-each select="dataTable">
611
					<xsl:call-template name="entityurl">
612
						<xsl:with-param name="type">dataTable</xsl:with-param>
613
						<xsl:with-param name="showtype">Data Table</xsl:with-param>
614
						<xsl:with-param name="index" select="position()" />
615
					</xsl:call-template>
616
				</xsl:for-each>
617
				<xsl:for-each select="spatialRaster">
618
					<xsl:call-template name="entityurl">
619
						<xsl:with-param name="type">spatialRaster</xsl:with-param>
620
						<xsl:with-param name="showtype">Spatial Raster</xsl:with-param>
621
						<xsl:with-param name="index" select="position()" />
622
					</xsl:call-template>
623
				</xsl:for-each>
624
				<xsl:for-each select="spatialVector">
625
					<xsl:call-template name="entityurl">
626
						<xsl:with-param name="type">spatialVector</xsl:with-param>
627
						<xsl:with-param name="showtype">Spatial Vector</xsl:with-param>
628
						<xsl:with-param name="index" select="position()" />
629
					</xsl:call-template>
630
				</xsl:for-each>
631
				<xsl:for-each select="storedProcedure">
632
					<xsl:call-template name="entityurl">
633
						<xsl:with-param name="type">storedProcedure</xsl:with-param>
634
						<xsl:with-param name="showtype">Stored Procedure</xsl:with-param>
635
						<xsl:with-param name="index" select="position()" />
636
					</xsl:call-template>
637
				</xsl:for-each>
638
				<xsl:for-each select="view">
639
					<xsl:call-template name="entityurl">
640
						<xsl:with-param name="type">view</xsl:with-param>
641
						<xsl:with-param name="showtype">View</xsl:with-param>
642
						<xsl:with-param name="index" select="position()" />
643
					</xsl:call-template>
644
				</xsl:for-each>
645
				<xsl:for-each select="otherEntity">
646
					<xsl:call-template name="entityurl">
647
						<xsl:with-param name="type">otherEntity</xsl:with-param>
648
						<xsl:with-param name="showtype">Other Data</xsl:with-param>
649
						<xsl:with-param name="index" select="position()" />
650
					</xsl:call-template>
651
				</xsl:for-each>
652
			</xsl:when>
653
			<xsl:otherwise>
654
				<xsl:for-each select="dataTable">
655
					<xsl:variable name="currentNode" select="position()" />
656
					<xsl:for-each select="../.">
657
						<div class="control-group">
658
							<label class="control-label">
659
								<xsl:text>Data Table:</xsl:text>
660
							</label>
661
							<div class="controls controls-well">
662
								<xsl:call-template name="chooseentity">
663
									<xsl:with-param name="entitytype">dataTable</xsl:with-param>
664
									<xsl:with-param name="entityindex" select="$currentNode" />
665
								</xsl:call-template>
666
							</div>
667
						</div>
668
					</xsl:for-each>
669
				</xsl:for-each>
670
				<xsl:for-each select="spatialRaster">
671
					<xsl:variable name="currentNode" select="position()" />
672
					<xsl:for-each select="../.">
673
						<tr>
674
							<td class="{$subHeaderStyle}" colspan="2">
675
								<xsl:text>Spatial Raster:</xsl:text>
676
							</td>
677
						</tr>
678
						<tr>
679
							<td>
680
								<xsl:call-template name="chooseentity">
681
									<xsl:with-param name="entitytype">spatialRaster</xsl:with-param>
682
									<xsl:with-param name="entityindex" select="$currentNode" />
683
								</xsl:call-template>
684
							</td>
685
						</tr>
686
					</xsl:for-each>
687
				</xsl:for-each>
688
				<xsl:for-each select="spatialVector">
689
					<xsl:variable name="currentNode" select="position()" />
690
					<xsl:for-each select="../.">
691
						<tr>
692
							<td class="{$subHeaderStyle}" colspan="2">
693
								<xsl:text>Spatial Vector:</xsl:text>
694
							</td>
695
						</tr>
696
						<tr>
697
							<td>
698
								<xsl:call-template name="chooseentity">
699
									<xsl:with-param name="entitytype">spatialVector</xsl:with-param>
700
									<xsl:with-param name="entityindex" select="$currentNode" />
701
								</xsl:call-template>
702
							</td>
703
						</tr>
704
					</xsl:for-each>
705
				</xsl:for-each>
706
				<xsl:for-each select="storedProcedure">
707
					<xsl:variable name="currentNode" select="position()" />
708
					<xsl:for-each select="../.">
709
						<tr>
710
							<td class="{$subHeaderStyle}" colspan="2">
711
								<xsl:text>Stored Procedure:</xsl:text>
712
							</td>
713
						</tr>
714
						<tr>
715
							<td>
716
								<xsl:call-template name="chooseentity">
717
									<xsl:with-param name="entitytype">storedProcedure</xsl:with-param>
718
									<xsl:with-param name="entityindex" select="$currentNode" />
719
								</xsl:call-template>
720
							</td>
721
						</tr>
722
					</xsl:for-each>
723
				</xsl:for-each>
724
				<xsl:for-each select="view">
725
					<xsl:variable name="currentNode" select="position()" />
726
					<xsl:for-each select="../.">
727
						<tr>
728
							<td class="{$subHeaderStyle}" colspan="2">
729
								<xsl:text>View:</xsl:text>
730
							</td>
731
						</tr>
732
						<tr>
733
							<td>
734
								<xsl:call-template name="chooseentity">
735
									<xsl:with-param name="entitytype">view</xsl:with-param>
736
									<xsl:with-param name="entityindex" select="$currentNode" />
737
								</xsl:call-template>
738
							</td>
739
						</tr>
740
					</xsl:for-each>
741
				</xsl:for-each>
742
				<xsl:for-each select="otherEntity">
743
					<xsl:variable name="currentNode" select="position()" />
744
					<xsl:for-each select="../.">
745
						<tr>
746
							<td class="{$subHeaderStyle}" colspan="2">
747
								<xsl:text>Other Entity:</xsl:text>
748
							</td>
749
						</tr>
750
						<tr>
751
							<td>
752
								<xsl:call-template name="chooseentity">
753
									<xsl:with-param name="entitytype">otherEntity</xsl:with-param>
754
									<xsl:with-param name="entityindex" select="$currentNode" />
755
								</xsl:call-template>
756
							</td>
757
						</tr>
758
					</xsl:for-each>
759
				</xsl:for-each>
760
			</xsl:otherwise>
761
		</xsl:choose>
762
	</xsl:template>
763

    
764
	<xsl:template name="entityurl">
765
		<xsl:param name="showtype" />
766
		<xsl:param name="type" />
767
		<xsl:param name="index" />
768
		<xsl:choose>
769
			<xsl:when test="references!=''">
770
				<xsl:variable name="ref_id" select="references" />
771
				<xsl:variable name="references" select="$ids[@id=$ref_id]" />
772
				<xsl:for-each select="$references">
773
					<div class="control-group">
774
						<label class="control-label">
775
							View Metadata:
776
						</label>
777
						<div class="controls controls-well">
778
							<a>
779
								<xsl:attribute name="href">
780
									<xsl:value-of select="$tripleURI" /><xsl:value-of select="$docid" />&amp;displaymodule=entity&amp;entitytype=<xsl:value-of select="$type"/>&amp;entityindex=<xsl:value-of select="$index"/>
781
								</xsl:attribute>
782
								<xsl:value-of select="./physical/objectName"/>
783
							</a>
784
						</div>
785
					</div>
786
				</xsl:for-each>
787
			</xsl:when>
788
			<xsl:otherwise>
789
				<div class="control-group">
790
					<label class="control-label">
791
						<xsl:value-of select="$showtype"/>:
792
					</label>
793
					<div class="controls controls-well"> 
794
						<xsl:value-of select="./entityName"/> 
795
						(<a>
796
						<xsl:attribute name="href">
797
						<xsl:value-of select="$tripleURI"/><xsl:value-of select="$docid"/>&amp;displaymodule=entity&amp;entitytype=<xsl:value-of select="$type"/>&amp;entityindex=<xsl:value-of select="$index"/></xsl:attribute>
798
						View Metadata</a> 
799
						<xsl:text> </xsl:text>
800
					    <xsl:choose>
801
						    <xsl:when test="./physical/distribution/online/url"> 
802
						    	| 
803
						    	<xsl:variable name="URL" select="./physical/distribution/online/url"/>
804
					            <a>
805
									<xsl:choose>
806
										<xsl:when test="starts-with($URL,'ecogrid')">
807
											<xsl:variable name="URL1" select="substring-after($URL, 'ecogrid://')"/>
808
											<xsl:variable name="dataDocID" select="substring-after($URL1, '/')"/>
809
											<xsl:attribute name="href"><xsl:value-of select="$tripleURI"/><xsl:value-of select="$dataDocID"/></xsl:attribute>
810
										</xsl:when>
811
										<xsl:otherwise>
812
											<xsl:attribute name="href"><xsl:value-of select="$URL"/></xsl:attribute>
813
										</xsl:otherwise>
814
									</xsl:choose>
815
								<xsl:attribute name="target">_blank</xsl:attribute>
816
								Download File <img src="/knb/style/images/page_white_put.png" style="margin:0px 0px; padding:0px;" border="0" alt="download"/></a>
817
							</xsl:when>
818
						</xsl:choose>)
819
					</div>
820
				</div>
821
			</xsl:otherwise>
822
		</xsl:choose>
823
	</xsl:template>
824

    
825
  <xsl:template match="text()" mode="dataset" />
826
  <xsl:template match="text()" mode="resource" />
827

    
828
</xsl:stylesheet>