Project

General

Profile

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

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: cjones $'
10
  *     '$Date: 2016-03-16 16:17:43 -0700 (Wed, 16 Mar 2016) $'
11
  * '$Revision: 9561 $'
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="UTF-8"
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:call-template name="identifier">
86
		               <xsl:with-param name="packageID" select="../@packageId"/>
87
		               <xsl:with-param name="system" select="../@system"/>
88
		               <xsl:with-param name="IDfirstColStyle" select="$firstColStyle"/>
89
		               <xsl:with-param name="IDsecondColStyle" select="$secondColStyle"/>
90
		             </xsl:call-template>
91
	             </xsl:for-each>
92
             </xsl:if>
93
             <!-- put in the alternate identifiers -->
94
             <xsl:if test="keywordSet">
95
             <xsl:for-each select="alternateIdentifier">
96
               <xsl:call-template name="resourcealternateIdentifier">
97
                 <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
98
                 <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
99
               </xsl:call-template>
100
             </xsl:for-each>
101
             </xsl:if>
102
             <!-- put in the text of the abstract-->
103
             <xsl:if test="./abstract">
104
             <xsl:for-each select="./abstract">
105
               <xsl:call-template name="resourceabstract">
106
                 <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
107
                 <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
108
               </xsl:call-template>
109
             </xsl:for-each>
110
             </xsl:if>
111
             <!-- put in the purpose of the dataset-->
112
             <xsl:if test="./purpose">
113
             <xsl:for-each select="./purpose">
114
               <xsl:call-template name="datasetpurpose">
115
                 <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
116
                 <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
117
               </xsl:call-template>
118
             </xsl:for-each>
119
             </xsl:if>
120
             <!-- put in the keyword sets -->
121
             <xsl:if test="keywordSet">
122
             	<div class="row-fluid">
123
					<div class="control-group">
124
						<label class="control-label">
125
							<xsl:text>Keywords</xsl:text>
126
						</label>	
127
						<div class="controls controls-well">
128
							<xsl:for-each select="keywordSet">
129
								<xsl:call-template name="resourcekeywordSet" >
130
									<xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
131
									<xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
132
								</xsl:call-template>
133
							</xsl:for-each>
134
						</div>
135
					</div>	
136
				</div>
137
             </xsl:if>
138

    
139
             <!-- put in the publication date -->
140
             <xsl:if test="./pubDate">
141
               <xsl:for-each select="pubDate">
142
                <xsl:call-template name="resourcepubDate" >
143
                  <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
144
                 </xsl:call-template>
145
               </xsl:for-each>
146
             </xsl:if>
147

    
148
             <!-- put in the language -->
149
             <xsl:if test="./language">
150
               <xsl:for-each select="language">
151
                 <xsl:call-template name="resourcelanguage" >
152
                   <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
153
                  </xsl:call-template>
154
               </xsl:for-each>
155
             </xsl:if>
156

    
157
             <!-- put in the series -->
158
             <xsl:if test="./series">
159
               <xsl:for-each select="series">
160
                 <xsl:call-template name="resourceseries" >
161
                   <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
162
                 </xsl:call-template>
163
               </xsl:for-each>
164
             </xsl:if>
165
             
166
         
167
         
168
           <!-- create a second easy access table listing the data entities -->
169
           <xsl:if test="dataTable|spatialRaster|spatialVector|storedProcedure|view|otherEntity">
170
			<xsl:if test="$withEntityLinks='1' or $displaymodule = 'printall'">
171
	             <xsl:call-template name="datasetentity"/>
172
			</xsl:if>
173
           </xsl:if>
174
           
175

    
176
     
177
     <h4>People and Associated Parties</h4>
178

    
179
       <!-- add in the creators -->
180
       <xsl:if test="creator">
181
         <div class="control-group">
182
         	<label class="control-label">
183
         		Data Set Creators
184
         	</label>
185
         	<div class="controls controls-well">
186
		         <xsl:for-each select="creator">
187
		         
188
		         	<xsl:variable name="absolutePath" >
189
			         	<xsl:for-each select="ancestor-or-self::*">
190
			         		<xsl:text>/</xsl:text>			         	
191
			         		<xsl:value-of select="local-name()" />
192
			         	</xsl:for-each>
193
			         </xsl:variable>	
194
					<xsl:variable name="index" select="position()" />
195
		         	<div>
196
		         		<!--
197
		         		<div class="annotation-target">
198
			         		<xsl:attribute name="resource">#xpointer(<xsl:value-of select="$absolutePath"/>[<xsl:value-of select="$index"/>])</xsl:attribute>
199
			         		<xsl:attribute name="type">party</xsl:attribute>
200
			         		PARTY
201
			         	</div>
202
			         	-->	
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
		         	</div>      
208
		         </xsl:for-each>
209
         	</div>
210
         </div>
211
       </xsl:if>
212

    
213
       <!-- add in the contacts -->
214
       <xsl:if test="contact">
215
         <div class="control-group">
216
         	<label class="control-label">Data Set Contacts</label>
217
         	<div class="controls controls-well">
218
	         	<xsl:for-each select="contact">
219
	         		<xsl:variable name="absolutePath" >
220
			         	<xsl:for-each select="ancestor-or-self::*">
221
			         		<xsl:text>/</xsl:text>			         	
222
			         		<xsl:value-of select="local-name()" />
223
			         	</xsl:for-each>
224
			         </xsl:variable>	
225
					<xsl:variable name="index" select="position()" />
226
		         	<div>
227
		         		<!--
228
		         		<div class="annotation-target">
229
			         		<xsl:attribute name="resource">#xpointer(<xsl:value-of select="$absolutePath"/>[<xsl:value-of select="$index"/>])</xsl:attribute>
230
			         		<xsl:attribute name="type">party</xsl:attribute>
231
			         		PARTY
232
			         	</div>
233
			         	-->
234
	               <xsl:call-template name="party">
235
	                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
236
	                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
237
	               </xsl:call-template>
238
	               </div>
239
		             
240
	         	</xsl:for-each>
241
	         </div>	
242
         </div>
243
       </xsl:if>
244

    
245
       <!-- add in the associatedParty  -->
246
       <xsl:if test="associatedParty">
247
         <div class="control-group">
248
         	<label class="control-label">Associated Parties</label>
249
         	<div class="controls controls-well">
250
				<xsl:for-each select="associatedParty">
251
					<xsl:variable name="absolutePath" >
252
			         	<xsl:for-each select="ancestor-or-self::*">
253
			         		<xsl:text>/</xsl:text>			         	
254
			         		<xsl:value-of select="local-name()" />
255
			         	</xsl:for-each>
256
			         </xsl:variable>	
257
					<xsl:variable name="index" select="position()" />
258
		         	<div>
259
		         		<!--
260
		         		<div class="annotation-target">
261
			         		<xsl:attribute name="resource">#xpointer(<xsl:value-of select="$absolutePath"/>[<xsl:value-of select="$index"/>])</xsl:attribute>
262
			         		<xsl:attribute name="type">party</xsl:attribute>
263
			         		PARTY
264
			         	</div>
265
			         	-->
266
					<xsl:call-template name="party">
267
						<xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
268
						<xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
269
					</xsl:call-template>
270
					</div>	
271
		         </xsl:for-each>
272
	         </div>	
273
         </div>
274
		         
275
       </xsl:if>
276

    
277
       <!-- add in the metadataProviders using a two column table -->
278
       <xsl:if test="metadataProvider">
279
		<div class="control-group">
280
         	<label class="control-label">Metadata Providers</label>
281
         	<div class="controls controls-well">
282
				<xsl:for-each select="metadataProvider">
283
					<xsl:variable name="absolutePath" >
284
			         	<xsl:for-each select="ancestor-or-self::*">
285
			         		<xsl:text>/</xsl:text>			         	
286
			         		<xsl:value-of select="local-name()" />
287
			         	</xsl:for-each>
288
			         </xsl:variable>	
289
					<xsl:variable name="index" select="position()" />
290
		         	<div>
291
		         		<!--
292
		         		<div class="annotation-target">
293
			         		<xsl:attribute name="resource">#xpointer(<xsl:value-of select="$absolutePath"/>[<xsl:value-of select="$index"/>])</xsl:attribute>
294
			         		<xsl:attribute name="type">party</xsl:attribute>
295
			         		PARTY
296
			         	</div>
297
			         	-->
298
	               <xsl:call-template name="party">
299
	                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
300
	                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
301
	               </xsl:call-template>
302
					</div>	
303
				</xsl:for-each>
304
		   </div>
305
		</div>      
306
       </xsl:if>
307

    
308
       <!-- add in the publishers using a two column table -->
309
       <xsl:if test="publisher">
310
         <div class="control-group">
311
         	<label class="control-label">Data Set Publishers</label>
312
         	<div class="controls controls-well">
313
		         <xsl:for-each select="publisher">
314
		         	<xsl:variable name="absolutePath" >
315
			         	<xsl:for-each select="ancestor-or-self::*">
316
			         		<xsl:text>/</xsl:text>			         	
317
			         		<xsl:value-of select="local-name()" />
318
			         	</xsl:for-each>
319
			         </xsl:variable>	
320
					<xsl:variable name="index" select="position()" />
321
		         	<div>
322
		         		<!--
323
		         		<div class="annotation-target">
324
			         		<xsl:attribute name="resource">#xpointer(<xsl:value-of select="$absolutePath"/>[<xsl:value-of select="$index"/>])</xsl:attribute>
325
			         		<xsl:attribute name="type">party</xsl:attribute>
326
			         		PARTY
327
			         	</div>
328
			         	-->
329
	               <xsl:call-template name="party">
330
	                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
331
	                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
332
	               </xsl:call-template>
333
					</div>		
334
		         </xsl:for-each>
335
	         </div>
336
         </div>
337
       </xsl:if>
338

    
339
     <!-- add in the coverage info -->
340
     <!--  <h4>Context</h4> -->
341
     
342
     <!-- add in the geographic coverage info -->
343
     <div class="row-fluid">  
344
           <xsl:if test="./coverage/geographicCoverage">
345
             <xsl:for-each select="./coverage/geographicCoverage">
346
               <xsl:call-template name="geographicCoverage">
347
                 <xsl:with-param name="firstColStyle" select="$firstColStyle"/>
348
                 <xsl:with-param name="secondColStyle" select="$secondColStyle"/>
349
               </xsl:call-template>
350
             </xsl:for-each>
351
           </xsl:if>
352
       </div>
353
       <!-- add in the temporal coverage info -->
354
       <div class="row-fluid">
355
           <xsl:if test="./coverage/temporalCoverage">
356
             <xsl:for-each select="./coverage/temporalCoverage">
357
               <xsl:call-template name="temporalCoverage">
358
                 <xsl:with-param name="firstColStyle" select="$firstColStyle"/>
359
                 <xsl:with-param name="secondColStyle" select="$secondColStyle"/>
360
               </xsl:call-template>
361
             </xsl:for-each>
362
           </xsl:if>
363
       </div>
364
       <!-- add in the taxonomic coverage info -->
365
       <div class="row-fluid">
366
           <xsl:if test="./coverage/taxonomicCoverage">
367
             <xsl:for-each select="./coverage/taxonomicCoverage">
368
               <xsl:call-template name="taxonomicCoverage">
369
                 <xsl:with-param name="firstColStyle" select="$firstColStyle"/>
370
                 <xsl:with-param name="secondColStyle" select="$secondColStyle"/>
371
               </xsl:call-template>
372
             </xsl:for-each>
373
           </xsl:if>
374
       </div>
375

    
376
     <!-- add in the project  info -->
377

    
378
     <div id="dataset-project" class="row-fluid">
379
         <xsl:if test="./project">
380
           <xsl:call-template name="datasetproject">
381
             <xsl:with-param name="firstColStyle" select="$firstColStyle"/>
382
             <xsl:with-param name="secondColStyle" select="$secondColStyle"/>
383
           </xsl:call-template>
384
         </xsl:if>
385
     </div>
386
       
387
     <!-- add in the method info -->
388

    
389
     <div class="row-fluid">
390
         <xsl:if test="./methods">
391
           <xsl:for-each select="./methods">
392
             <xsl:call-template name="datasetmethod">
393
               <xsl:with-param name="methodfirstColStyle" select="$firstColStyle"/>
394
               <xsl:with-param name="methodsecondColStyle" select="$secondColStyle"/>
395
             </xsl:call-template>
396
           </xsl:for-each>
397
         </xsl:if>
398
     </div>
399

    
400
     <h4>Data Set Usage Rights</h4>
401

    
402
       <!-- add in the intellectiual rights info -->
403
     <div class="row-fluid">
404
         <xsl:if test="intellectualRights">
405
           <xsl:for-each select="intellectualRights">
406
             <xsl:call-template name="resourceintellectualRights">
407
               <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
408
               <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
409
             </xsl:call-template>
410
           </xsl:for-each>
411
         </xsl:if>
412
     </div>
413

    
414
       <!-- add in the access control info -->
415
     <div class="row-fluid">
416
         <xsl:if test="access">
417
           <xsl:for-each select="access">
418
             <xsl:call-template name="access">
419
               <xsl:with-param name="accessfirstColStyle" select="$firstColStyle"/>
420
               <xsl:with-param name="accesssecondColStyle" select="$secondColStyle"/>
421
             </xsl:call-template>
422
           </xsl:for-each>
423
         </xsl:if>
424
     </div>
425
  </xsl:template>
426

    
427
  <xsl:template name="datasetresource">
428
     <div class="row-fluid">
429
        <xsl:call-template name="resource">
430
          <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
431
          <xsl:with-param name="ressubHeaderStyle" select="$subHeaderStyle"/>
432
        </xsl:call-template>
433
     </div>
434
  </xsl:template>
435

    
436

    
437
  <xsl:template name="datasetpurpose">
438
    <xsl:for-each select="purpose">
439
      <div class="control-group">
440
      	<label class="control-label"><xsl:text>Purpose</xsl:text></label>
441
       	<div  class="controls">
442
            &#160;
443
              <xsl:call-template name="text">
444
                <xsl:with-param name="textfirstColStyle" select="$firstColStyle"/>
445
              </xsl:call-template>
446
          </div>
447
       </div>
448
     </xsl:for-each>
449
  </xsl:template>
450

    
451
  <xsl:template name="datasetmaintenance">
452
    <xsl:for-each select="maintenance">
453
      <div class="control-group">
454
      	<label class="control-label"><xsl:text>Maintenance</xsl:text></label>
455
      	<div class="controls">
456
		     <xsl:call-template name="mantenancedescription"/>
457
		      <div class="control-group">
458
      			<label class="control-label">Frequency</label>
459
		        <div class="controls" >
460
		           <xsl:value-of select="maintenanceUpdateFrequency"/>
461
		        </div>
462
		     </div>
463
		     <xsl:call-template name="datasetchangehistory"/>
464
		   </div>
465
		</div>
466
   	</xsl:for-each>
467
  </xsl:template>
468

    
469
  <xsl:template name="mantenancedescription">
470
   <xsl:for-each select="description">
471
     <div class="control-group">
472
      	<label class="control-label">Description</label>
473
        <div class="controls">
474
            <xsl:call-template name="text">
475
               <xsl:with-param name="textfirstColStyle" select="$firstColStyle"/>
476
             </xsl:call-template>
477
          </div>
478
     </div>
479
    </xsl:for-each>
480
  </xsl:template>
481

    
482
   <xsl:template name="datasetchangehistory">
483
   <xsl:if test="changeHistory">
484
     <div class="control-group">
485
      	<label class="control-label">History</label>
486
          <div class="controls">
487
              <xsl:for-each select="changeHistory">
488
                <xsl:call-template name="historydetails"/>
489
              </xsl:for-each>
490
          </div>
491
     </div>
492
     </xsl:if>
493
   </xsl:template>
494

    
495
   <xsl:template name="historydetails">
496
        <div class="control-group">
497
	      	<label class="control-label">scope</label>
498
	        <div class="controls">
499
	            <xsl:value-of select="changeScope"/>
500
	        </div>
501
        </div>
502
        <div class="control-group">
503
	      	<label class="control-label">old value</label>
504
	        <div class="controls">
505
	            <xsl:value-of select="oldValue"/>
506
        	</div>
507
       	</div>
508
        <div class="control-group">
509
      		<label class="control-label">change date</label>
510
            <div class="controls">
511
	            <xsl:value-of select="changeDate"/>
512
	        </div>
513
	    </div>
514
        <xsl:if test="comment and normalize-space(comment)!=''">
515
			<div class="control-group">
516
      			<label class="control-label">comment</label>
517
      			<div class="controls">
518
		            <xsl:value-of select="comment"/>
519
				</div>
520
			</div>
521
        </xsl:if>
522
  </xsl:template>
523

    
524
  <xsl:template name="datasetcontact">
525
    <div class="control-group">
526
      	<label class="control-label"><xsl:text>Contact</xsl:text></label>
527
	    <div class="controls">
528
		    <xsl:for-each select="contact">
529
			       <xsl:call-template name="party">
530
		              <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
531
		       </xsl:call-template>
532
	    	</xsl:for-each>
533
	    </div>
534
	</div>    	
535
  </xsl:template>
536

    
537
  <xsl:template name="datasetpublisher">
538
   <xsl:for-each select="publisher">
539
     <div class="control-group">
540
      	<label class="control-label"><xsl:text>Publisher</xsl:text></label>
541
     	<div class="controls">
542
	       <xsl:call-template name="party">
543
	              <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
544
	       </xsl:call-template>
545
     	</div>
546
     </div>
547
   </xsl:for-each>
548
  </xsl:template>
549

    
550
  <xsl:template name="datasetpubplace">
551
    <xsl:for-each select="pubPlace">
552
      <div class="control-group">
553
      	<label class="control-label">Publish Place</label>
554
        <div class="controls">
555
          <xsl:value-of select="."/>
556
		</div>
557
      </div>
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
    <h4><xsl:text>Project Information</xsl:text></h4>
571
    <xsl:for-each select="project">
572
     <div class="row-fluid">
573
       <xsl:call-template name="project">
574
         <xsl:with-param name="projectfirstColStyle" select="$firstColStyle"/>
575
       </xsl:call-template>
576
     </div>
577
    </xsl:for-each>
578
  </xsl:template>
579

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

    
747
	<xsl:template name="entityurl">
748
		<xsl:param name="showtype" />
749
		<xsl:param name="type" />
750
		<xsl:param name="index" />
751
		<xsl:choose>
752
			<xsl:when test="references!=''">
753
				<xsl:variable name="ref_id" select="references" />
754
				<xsl:variable name="references" select="$ids[@id=$ref_id]" />
755
				<xsl:for-each select="$references">
756
					<div class="control-group">
757
						<label class="control-label">
758
							View Metadata
759
						</label>
760
						<div class="controls controls-well">
761
							<a>
762
								<xsl:attribute name="href">
763
									<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"/>
764
								</xsl:attribute>
765
								<xsl:value-of select="./physical/objectName"/>
766
							</a>
767
						</div>
768
					</div>
769
				</xsl:for-each>
770
			</xsl:when>
771
			<xsl:otherwise>
772
				<div class="control-group">
773
					<label class="control-label">
774
						<xsl:value-of select="$showtype"/>
775
					</label>
776
					<div class="controls controls-well"> 
777
						<xsl:value-of select="./entityName"/> 
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"/></xsl:attribute>
781
						View Metadata</a> 
782
						<xsl:text> </xsl:text>
783
					    <xsl:choose>
784
						    <xsl:when test="./physical/distribution/online/url"> 
785
						    	| 
786
						    	<xsl:variable name="URL" select="./physical/distribution/online/url"/>
787
					            <a>
788
									<xsl:choose>
789
										<xsl:when test="starts-with($URL,'ecogrid')">
790
											<xsl:variable name="URL1" select="substring-after($URL, 'ecogrid://')"/>
791
											<xsl:variable name="dataDocID" select="substring-after($URL1, '/')"/>
792
											<xsl:attribute name="href">
793
												<xsl:value-of select="$tripleURI"/><xsl:value-of select="$dataDocID"/>
794
											</xsl:attribute>
795
										</xsl:when>
796
										<xsl:otherwise>
797
											<xsl:attribute name="href"><xsl:value-of select="$URL"/></xsl:attribute>
798
										</xsl:otherwise>
799
									</xsl:choose>
800
								<xsl:attribute name="target">_blank</xsl:attribute>
801
								Download File <i class="icon-download" alt="download"></i>
802
								</a>
803
							</xsl:when>
804
						</xsl:choose>)
805
					</div>
806
				</div>
807
			</xsl:otherwise>
808
		</xsl:choose>
809
	</xsl:template>
810

    
811
  <xsl:template match="text()" mode="dataset" />
812
  <xsl:template match="text()" mode="resource" />
813

    
814
</xsl:stylesheet>