Project

General

Profile

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: 2006-11-17 13:37:07 -0800 (Fri, 17 Nov 2006) $'
11
  * '$Revision: 3094 $'
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
             <!--
48
             <xsl:call-template name="datasetresource"/>
49
             <xsl:call-template name="datasetaccess"/>
50
             <xsl:call-template name="datasetpurpose"/>
51
             <xsl:call-template name="datasetmaintenance"/>
52
             <xsl:call-template name="datasetcontact"/>
53
             <xsl:call-template name="datasetpublisher"/>
54
             <xsl:call-template name="datasetpubplace"/>
55
             <xsl:call-template name="datasetmethod"/>
56
             <xsl:call-template name="datasetproject"/>
57
             <xsl:if test="$withEntityLinks='1'">
58
               <xsl:call-template name="datasetentity"/>
59
             </xsl:if>
60
             -->
61
          </xsl:for-each>
62
       </xsl:when>
63
       <xsl:otherwise>
64
             <xsl:call-template name="datasetmixed"/>
65
       </xsl:otherwise>
66
      </xsl:choose>
67

    
68
  </xsl:template>
69
  
70
  <xsl:template name="datasetmixed">
71
		<h3>
72
	 		<xsl:choose>
73
	     		<xsl:when test="normalize-space(./title) != ''">
74
			     	<xsl:for-each select="./title">
75
			     		<xsl:call-template name="i18n">
76
			     			<xsl:with-param name="i18nElement" select="."/>
77
			     		</xsl:call-template>
78
			     	</xsl:for-each>
79
			     </xsl:when>
80
			     <xsl:otherwise>
81
			     	Data Set Documentation
82
			     </xsl:otherwise>
83
	     	</xsl:choose>
84
	 	</h3>
85
     <!-- citation -->
86
     <table class="group group_border onehundred_percent">
87
     	<xsl:for-each select=".">
88
	     	<xsl:call-template name="datasetcitation" />
89
	    </xsl:for-each>		
90
     </table>
91
     
92
     <table class="subGroup onehundred_percent">
93
       <tr>
94
         <td class="fortyfive_percent">
95
           <!-- style the identifying information into a small table -->
96
           <table class="{$tabledefaultStyle}">
97
             <tr><th colspan="2">General Information:</th></tr>
98
             <!-- put in the title -->
99
             <xsl:if test="./title">
100
               <xsl:for-each select="./title">
101
                 <xsl:call-template name="resourcetitle">
102
                   <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
103
                   <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
104
                 </xsl:call-template>
105
               </xsl:for-each>
106
             </xsl:if>
107
             <!-- put in the short name -->
108
             <xsl:if test="shortName">
109
             <xsl:for-each select="./shortName">
110
             <xsl:call-template name="resourceshortName">
111
               <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
112
               <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
113
             </xsl:call-template>
114
             </xsl:for-each>
115
             </xsl:if>
116
             <!-- put in the identifier and system that the ID belongs to -->
117
             <xsl:if test="../@packageId">
118
             <xsl:for-each select="../@packageId">
119
             <xsl:call-template name="identifier">
120
               <xsl:with-param name="packageID" select="../@packageId"/>
121
               <xsl:with-param name="system" select="../@system"/>
122
               <xsl:with-param name="IDfirstColStyle" select="$firstColStyle"/>
123
               <xsl:with-param name="IDsecondColStyle" select="$secondColStyle"/>
124
             </xsl:call-template>
125
             </xsl:for-each>
126
             </xsl:if>
127
             <!-- put in the alternate identifiers -->
128
             <xsl:if test="keywordSet">
129
             <xsl:for-each select="alternateIdentifier">
130
               <xsl:call-template name="resourcealternateIdentifier">
131
                 <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
132
                 <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
133
               </xsl:call-template>
134
             </xsl:for-each>
135
             </xsl:if>
136
             <!-- put in the text of the abstract-->
137
             <xsl:if test="./abstract">
138
             <xsl:for-each select="./abstract">
139
               <xsl:call-template name="resourceabstract">
140
                 <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
141
                 <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
142
               </xsl:call-template>
143
             </xsl:for-each>
144
             </xsl:if>
145
             <!-- put in the purpose of the dataset-->
146
             <xsl:if test="./purpose">
147
             <xsl:for-each select="./purpose">
148
               <xsl:call-template name="datasetpurpose">
149
                 <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
150
                 <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
151
               </xsl:call-template>
152
             </xsl:for-each>
153
             </xsl:if>
154
             <!-- put in the keyword sets -->
155
             <xsl:if test="keywordSet">
156
               <tr>
157
                 <td class="{$firstColStyle}">
158
                   <xsl:text>Keywords:</xsl:text>
159
                 </td>
160
                 <td class="{$secondColStyle}">
161
                 <xsl:for-each select="keywordSet">
162
                   <xsl:call-template name="resourcekeywordSet" >
163
                     <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
164
                     <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
165
                   </xsl:call-template>
166
                 </xsl:for-each>
167
                 </td>
168
               </tr>
169
             </xsl:if>
170

    
171
             <!-- put in the publication date -->
172
             <xsl:if test="./pubDate">
173
               <xsl:for-each select="pubDate">
174
                <xsl:call-template name="resourcepubDate" >
175
                  <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
176
                 </xsl:call-template>
177
               </xsl:for-each>
178
             </xsl:if>
179

    
180
             <!-- put in the language -->
181
             <xsl:if test="./language">
182
               <xsl:for-each select="language">
183
                 <xsl:call-template name="resourcelanguage" >
184
                   <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
185
                  </xsl:call-template>
186
               </xsl:for-each>
187
             </xsl:if>
188

    
189
             <!-- put in the series -->
190
             <xsl:if test="./series">
191
               <xsl:for-each select="series">
192
                 <xsl:call-template name="resourceseries" >
193
                   <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
194
                 </xsl:call-template>
195
               </xsl:for-each>
196
             </xsl:if>
197
           </table>
198
         </td>
199
         <!-- begin the second column of the 'Data Set Description' section -->
200
         <td class="fortyfive_percent">
201
           <!-- create a second easy access table listing the data entities -->
202
           <xsl:if test="dataTable|spatialRaster|spatialVector|storedProcedure|view|otherEntity">
203
           <table class="{$tabledefaultStyle}">
204
             <xsl:call-template name="datasetentity"/>
205
           </table>
206
           </xsl:if>
207
         </td>
208
       </tr>
209
     </table>
210
     <h3>Involved Parties</h3>
211

    
212
     <!-- this section creates a two column table to present the involved
213
     parties in boxes across the entire page -->
214
     <table class="subGroup onehundred_percent">
215

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

    
241
       <!-- add in the contacts using a two column table -->
242
       <xsl:if test="contact">
243
         <th colspan="2">Data Set Contacts:</th>
244
         <xsl:for-each select="creator">
245
         <tr>
246
           <xsl:if test="position() mod 2 = 1">
247
             <td class="fortyfive_percent">
248
               <xsl:call-template name="party">
249
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
250
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
251
               </xsl:call-template>
252
             </td>
253
             <xsl:for-each select="following-sibling::contact[position()=1]">
254
             <td class="fortyfive_percent">
255
               <xsl:call-template name="party">
256
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
257
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
258
               </xsl:call-template>
259
             </td>
260
             </xsl:for-each>
261
           </xsl:if>
262
         </tr>
263
         </xsl:for-each>
264
       </xsl:if>
265

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

    
291
       <!-- add in the metadataProviders using a two column table -->
292
       <xsl:if test="metadataProvider">
293
         <th colspan="2">Metadata Providers:</th>
294
         <xsl:for-each select="metadataProvider">
295
         <tr>
296
           <xsl:if test="position() mod 2 = 1">
297
             <td class="fortyfive_percent">
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
             </td>
303
             <xsl:for-each select="following-sibling::metadataProvider[position()=1]">
304
             <td class="fortyfive_percent">
305
               <xsl:call-template name="party">
306
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
307
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
308
               </xsl:call-template>
309
             </td>
310
             </xsl:for-each>
311
           </xsl:if>
312
         </tr>
313
         </xsl:for-each>
314
       </xsl:if>
315

    
316
       <!-- add in the publishers using a two column table -->
317
       <xsl:if test="publisher">
318
         <th colspan="2">Data Set Publishers:</th>
319
         <xsl:for-each select="publisher">
320
         <tr>
321
           <xsl:if test="position() mod 2 = 1">
322
             <td class="fortyfive_percent">
323
               <xsl:call-template name="party">
324
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
325
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
326
               </xsl:call-template>
327
             </td>
328
             <xsl:for-each select="following-sibling::publisher[position()=1]">
329
             <td class="fortyfive_percent">
330
               <xsl:call-template name="party">
331
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
332
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
333
               </xsl:call-template>
334
             </td>
335
             </xsl:for-each>
336
           </xsl:if>
337
         </tr>
338
         </xsl:for-each>
339
       </xsl:if>
340
     </table>
341

    
342
     <h3>Data Set Characteristics</h3>
343

    
344
       <!-- add in the coverage info -->
345
     <table class="subGroup onehundred_percent">  
346
       <tr>
347
       <!-- add in the geographic coverage info -->
348
         <td class="fortyfive_percent">
349
           <xsl:if test="./coverage/geographicCoverage">
350
             <xsl:for-each select="./coverage/geographicCoverage">
351
               <xsl:call-template name="geographicCoverage">
352
                 <xsl:with-param name="firstColStyle" select="$firstColStyle"/>
353
                 <xsl:with-param name="secondColStyle" select="$secondColStyle"/>
354
               </xsl:call-template>
355
             </xsl:for-each>
356
           </xsl:if>
357
         </td>
358
       <!-- add in the temporal coverage info -->
359
         <td class="fortyfive_percent">
360
           <xsl:if test="./coverage/temporalCoverage">
361
             <xsl:for-each select="./coverage/temporalCoverage">
362
               <xsl:call-template name="temporalCoverage">
363
                 <xsl:with-param name="firstColStyle" select="$firstColStyle"/>
364
                 <xsl:with-param name="secondColStyle" select="$secondColStyle"/>
365
               </xsl:call-template>
366
             </xsl:for-each>
367
           </xsl:if>
368
         </td>
369
       </tr>
370
       <tr>
371
       <!-- add in the taxonomic coverage info -->
372
         <td colspan="2" class="onehundred_percent">
373
           <xsl:if test="./coverage/taxonomicCoverage">
374
             <xsl:for-each select="./coverage/taxonomicCoverage">
375
               <xsl:call-template name="taxonomicCoverage">
376
                 <xsl:with-param name="firstColStyle" select="$firstColStyle"/>
377
                 <xsl:with-param name="secondColStyle" select="$secondColStyle"/>
378
               </xsl:call-template>
379
             </xsl:for-each>
380
           </xsl:if>
381
         </td>
382
       </tr>
383
     </table>
384

    
385
     <!-- add in the method info -->
386
     <h3>Sampling, Processing and Quality Control Methods</h3>
387

    
388
     <table class="subGroup onehundred_percent">  
389
       <tr>
390
         <td colspan="2" class="onehundred_percent">
391
           <xsl:if test="./methods">
392
             <xsl:for-each select="./methods">
393
               <xsl:call-template name="datasetmethod">
394
                 <xsl:with-param name="methodfirstColStyle" select="$firstColStyle"/>
395
                 <xsl:with-param name="methodsecondColStyle" select="$secondColStyle"/>
396
               </xsl:call-template>
397
             </xsl:for-each>
398
           </xsl:if>
399
         </td>
400
       </tr>
401
     </table>
402

    
403
     <h3>Data Set Usage Rights</h3>
404

    
405
       <!-- add in the intellectiual rights info -->
406
     <table class="subGroup onehundred_percent">  
407
       <tr>
408
         <td>
409
           <xsl:if test="intellectualRights">
410
             <xsl:for-each select="intellectualRights">
411
               <xsl:call-template name="resourceintellectualRights">
412
                 <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
413
                 <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
414
               </xsl:call-template>
415
             </xsl:for-each>
416
           </xsl:if>
417
         </td>
418
       </tr>
419
     </table>
420

    
421
       <!-- add in the access control info -->
422
     <table class="subGroup onehundred_percent">  
423
       <tr>
424
         <td>
425
           <xsl:if test="access">
426
             <xsl:for-each select="access">
427
               <xsl:call-template name="access">
428
                 <xsl:with-param name="accessfirstColStyle" select="$firstColStyle"/>
429
                 <xsl:with-param name="accesssecondColStyle" select="$secondColStyle"/>
430
               </xsl:call-template>
431
             </xsl:for-each>
432
           </xsl:if>
433
         </td>
434
       </tr>
435
     </table>
436
  </xsl:template>
437

    
438
  <xsl:template name="datasetresource">
439
     <tr>
440
        <td colspan="2">
441
          <xsl:call-template name="resource">
442
            <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
443
            <xsl:with-param name="ressubHeaderStyle" select="$subHeaderStyle"/>
444
          </xsl:call-template>
445
       </td>
446
     </tr>
447
  </xsl:template>
448

    
449

    
450

    
451
  <xsl:template name="datasetpurpose">
452
    <xsl:for-each select="purpose">
453
      <tr><td colspan="2">
454
           <xsl:text>Purpose:</xsl:text>
455
        </td>
456
       </tr>
457
       <tr>
458
            <td  class="{$firstColStyle}">
459
            &#160;
460
            </td>
461
            <td>
462
              <xsl:call-template name="text">
463
                <xsl:with-param name="textfirstColStyle" select="$firstColStyle"/>
464
              </xsl:call-template>
465
            </td>
466
       </tr>
467
     </xsl:for-each>
468
  </xsl:template>
469

    
470
  <xsl:template name="datasetmaintenance">
471
    <xsl:for-each select="maintenance">
472
      <tr><td colspan="2">
473
        <xsl:text>Maintenance:</xsl:text>
474
     </td></tr>
475
     <xsl:call-template name="mantenancedescription"/>
476
      <tr>
477
          <td  class="{$firstColStyle}">
478
          Frequency:
479
          </td>
480
          <td class="{$secondColStyle}" >
481
           <xsl:value-of select="maintenanceUpdateFrequency"/>
482
          </td>
483
     </tr>
484
     <xsl:call-template name="datasetchangehistory"/>
485
   </xsl:for-each>
486
  </xsl:template>
487

    
488
  <xsl:template name="mantenancedescription">
489
   <xsl:for-each select="description">
490
     <tr>
491
          <td  class="{$firstColStyle}">
492
          Description:
493
          </td>
494
          <td>
495
            <xsl:call-template name="text">
496
               <xsl:with-param name="textfirstColStyle" select="$firstColStyle"/>
497
             </xsl:call-template>
498
          </td>
499
     </tr>
500
    </xsl:for-each>
501
  </xsl:template>
502

    
503
   <xsl:template name="datasetchangehistory">
504
   <xsl:if test="changeHistory">
505
     <tr>
506
          <td class="{$firstColStyle}">
507
          History:
508
          </td>
509
          <td>
510
            <table class="{$tabledefaultStyle}">
511
              <xsl:for-each select="changeHistory">
512
                <xsl:call-template name="historydetails"/>
513
              </xsl:for-each>
514
            </table>
515
          </td>
516
     </tr>
517
     </xsl:if>
518
   </xsl:template>
519

    
520
   <xsl:template name="historydetails">
521
        <tr><td class="{$firstColStyle}">
522
            scope:</td>
523
            <td class="{$secondColStyle}">
524
            <xsl:value-of select="changeScope"/>
525
        </td></tr>
526
        <tr><td class="{$firstColStyle}">
527
            old value:</td>
528
            <td class="{$secondColStyle}">
529
            <xsl:value-of select="oldValue"/>
530
        </td></tr>
531
        <tr><td class="{$firstColStyle}">
532
            change date:</td>
533
            <td class="{$secondColStyle}">
534
            <xsl:value-of select="changeDate"/>
535
        </td></tr>
536
        <xsl:if test="comment and normalize-space(comment)!=''">
537
          <tr><td class="{$firstColStyle}">
538
            comment:</td><td class="{$secondColStyle}">
539
            <xsl:value-of select="comment"/>
540
          </td></tr>
541
        </xsl:if>
542
  </xsl:template>
543

    
544
  <xsl:template name="datasetcontact">
545
    <tr><td colspan="2">
546
        <xsl:text>Contact:</xsl:text>
547
     </td></tr>
548
    <xsl:for-each select="contact">
549
     <tr><td colspan="2">
550
       <xsl:call-template name="party">
551
              <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
552
       </xsl:call-template>
553
     </td></tr>
554
    </xsl:for-each>
555
  </xsl:template>
556

    
557
  <xsl:template name="datasetpublisher">
558
   <xsl:for-each select="publisher">
559
     <tr><td colspan="2">
560
        <xsl:text>Publisher:</xsl:text>
561
     </td></tr>
562
     <tr><td colspan="2">
563
       <xsl:call-template name="party">
564
              <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
565
       </xsl:call-template>
566
     </td></tr>
567
   </xsl:for-each>
568
  </xsl:template>
569

    
570
  <xsl:template name="datasetpubplace">
571
    <xsl:for-each select="pubPlace">
572
      <tr><td class="{$firstColStyle}">
573
           Publish Place:</td>
574
          <td class="{$secondColStyle}">
575
          <xsl:value-of select="."/>
576
          </td>
577
      </tr>
578
   </xsl:for-each>
579
  </xsl:template>
580

    
581
  <xsl:template name="datasetmethod">
582
     <xsl:for-each select=".">
583
        <xsl:call-template name="method">
584
          <xsl:with-param name="methodfirstColStyle" select="$firstColStyle"/>
585
        </xsl:call-template>
586
    </xsl:for-each>
587
  </xsl:template>
588

    
589
  <xsl:template name="datasetproject">
590
    <xsl:for-each select="project">
591
     <tr>
592
       <td colspan="2">
593
         <h3><xsl:text>Parent Project Information:</xsl:text></h3>
594
       </td>
595
     </tr>
596
     <tr>
597
       <td colspan="2">
598
       <xsl:call-template name="project">
599
         <xsl:with-param name="projectfirstColStyle" select="$firstColStyle"/>
600
       </xsl:call-template>
601
       </td>
602
     </tr>
603
    </xsl:for-each>
604
  </xsl:template>
605

    
606
   <xsl:template name="datasetaccess">
607
    <xsl:for-each select="access">
608
      <tr>
609
        <td colspan="2">
610
        <xsl:call-template name="access">
611
          <xsl:with-param name="accessfirstColStyle" select="$firstColStyle"/>
612
          <xsl:with-param name="accesssubHeaderStyle" select="$subHeaderStyle"/>
613
        </xsl:call-template>
614
        </td>
615
      </tr>
616
    </xsl:for-each>
617
  </xsl:template>
618

    
619

    
620

    
621
  <xsl:template name="datasetentity" >
622
   <xsl:if test="dataTable or spatialRaster or spatialVector or storedProcedures or view or otherEntity">
623
      <tr>
624
        <th>
625
        <xsl:text>Data Table, Image, and Other Entity Details:</xsl:text>
626
        </th>
627
      </tr>
628
   </xsl:if>
629
    <xsl:for-each select="dataTable">
630
      <xsl:call-template name="entityurl">
631
        <xsl:with-param name="type">dataTable</xsl:with-param>
632
        <xsl:with-param name="showtype">Data Table</xsl:with-param>
633
        <xsl:with-param name="index" select="position()"/>
634
      </xsl:call-template>
635
   </xsl:for-each>
636
   <xsl:for-each select="spatialRaster">
637
     <xsl:call-template name="entityurl">
638
        <xsl:with-param name="type">spatialRaster</xsl:with-param>
639
        <xsl:with-param name="showtype">Spatial Raster</xsl:with-param>
640
        <xsl:with-param name="index" select="position()"/>
641
      </xsl:call-template>
642
   </xsl:for-each>
643
   <xsl:for-each select="spatialVector">
644
      <xsl:call-template name="entityurl">
645
        <xsl:with-param name="type">spatialVector</xsl:with-param>
646
        <xsl:with-param name="showtype">Spatial Vector</xsl:with-param>
647
        <xsl:with-param name="index" select="position()"/>
648
      </xsl:call-template>
649
   </xsl:for-each>
650
   <xsl:for-each select="storedProcedure">
651
     <xsl:call-template name="entityurl">
652
        <xsl:with-param name="type">storedProcedure</xsl:with-param>
653
        <xsl:with-param name="showtype">Stored Procedure</xsl:with-param>
654
        <xsl:with-param name="index" select="position()"/>
655
      </xsl:call-template>
656
   </xsl:for-each>
657
   <xsl:for-each select="view">
658
      <xsl:call-template name="entityurl">
659
        <xsl:with-param name="type">view</xsl:with-param>
660
        <xsl:with-param name="showtype">View</xsl:with-param>
661
        <xsl:with-param name="index" select="position()"/>
662
      </xsl:call-template>
663
   </xsl:for-each>
664
   <xsl:for-each select="otherEntity">
665
      <xsl:call-template name="entityurl">
666
        <xsl:with-param name="type">otherEntity</xsl:with-param>
667
        <xsl:with-param name="showtype">Other Entity</xsl:with-param>
668
        <xsl:with-param name="index" select="position()"/>
669
      </xsl:call-template>
670
   </xsl:for-each>
671
  </xsl:template>
672

    
673
  <xsl:template name="entityurl">
674
     <xsl:param name="showtype"/>
675
     <xsl:param name="type"/>
676
     <xsl:param name="index"/>
677
      <xsl:choose>
678
         <xsl:when test="references!=''">
679
          <xsl:variable name="ref_id" select="references"/>
680
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
681
          <xsl:for-each select="$references">
682
            <tr>
683
              <td class="{$firstColStyle}">
684
                <a>
685
                <xsl:attribute name="href">
686
                <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"/>
687
                </xsl:attribute>
688
                <xsl:value-of select="./entityName"/> (<xsl:value-of select="$showtype"/>)</a>
689
            </td>
690
         </tr>
691
          </xsl:for-each>
692
        </xsl:when>
693
        <xsl:otherwise>
694
         <tr>
695
            <td class="{$firstColStyle}">
696
             <a><xsl:attribute name="href">
697
              <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>
698
             <xsl:value-of select="./entityName"/> (<xsl:value-of select="$showtype"/>)</a>
699
            </td>
700
         </tr>
701
       </xsl:otherwise>
702
     </xsl:choose>
703
  </xsl:template>
704

    
705
  <xsl:template match="text()" mode="dataset" />
706
  <xsl:template match="text()" mode="resource" />
707

    
708
</xsl:stylesheet>
(7-7/27)