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
             <!--
66
             <xsl:call-template name="datasetresource"/>
67
             <xsl:call-template name="datasetaccess"/>
68
             <xsl:call-template name="datasetpurpose"/>
69
             <xsl:call-template name="datasetmaintenance"/>
70
             <xsl:call-template name="datasetcontact"/>
71
             <xsl:call-template name="datasetpublisher"/>
72
             <xsl:call-template name="datasetpubplace"/>
73
             <xsl:call-template name="datasetmethod"/>
74
             <xsl:call-template name="datasetproject"/>
75
             <xsl:if test="$withEntityLinks='1'">
76
               <xsl:call-template name="datasetentity"/>
77
             </xsl:if>
78
             -->
79
       </xsl:otherwise>
80
      </xsl:choose>
81

    
82
  </xsl:template>
83
  
84
  <xsl:template name="datasetmixed">
85
     <h3>Data Set Description</h3>
86
     <table class="subGroup onehundred_percent">
87
       <tr>
88
         <td class="fortyfive_percent">
89
           <!-- style the identifying information into a small table -->
90
           <table class="{$tabledefaultStyle}">
91
             <tr><th colspan="2">General Information:</th></tr>
92
             <!-- put in the title -->
93
             <xsl:if test="./title">
94
               <xsl:for-each select="./title">
95
                 <xsl:call-template name="resourcetitle">
96
                   <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
97
                   <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
98
                 </xsl:call-template>
99
               </xsl:for-each>
100
             </xsl:if>
101
             <!-- put in the short name -->
102
             <xsl:if test="shortName">
103
             <xsl:for-each select="./shortName">
104
             <xsl:call-template name="resourceshortName">
105
               <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
106
               <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
107
             </xsl:call-template>
108
             </xsl:for-each>
109
             </xsl:if>
110
             <!-- put in the identifier and system that the ID belongs to -->
111
             <xsl:if test="../@packageId">
112
             <xsl:for-each select="../@packageId">
113
             <xsl:call-template name="identifier">
114
               <xsl:with-param name="packageID" select="../@packageId"/>
115
               <xsl:with-param name="system" select="../@system"/>
116
               <xsl:with-param name="IDfirstColStyle" select="$firstColStyle"/>
117
               <xsl:with-param name="IDsecondColStyle" select="$secondColStyle"/>
118
             </xsl:call-template>
119
             </xsl:for-each>
120
             </xsl:if>
121
             <!-- put in the alternate identifiers -->
122
             <xsl:if test="keywordSet">
123
             <xsl:for-each select="alternateIdentifier">
124
               <xsl:call-template name="resourcealternateIdentifier">
125
                 <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
126
                 <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
127
               </xsl:call-template>
128
             </xsl:for-each>
129
             </xsl:if>
130
             <!-- put in the text of the abstract-->
131
             <xsl:if test="./abstract">
132
             <xsl:for-each select="./abstract">
133
               <xsl:call-template name="resourceabstract">
134
                 <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
135
                 <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
136
               </xsl:call-template>
137
             </xsl:for-each>
138
             </xsl:if>
139
             <!-- put in the purpose of the dataset-->
140
             <xsl:if test="./purpose">
141
             <xsl:for-each select="./purpose">
142
               <xsl:call-template name="datasetpurpose">
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
             </xsl:if>
148
             <!-- put in the keyword sets -->
149
             <xsl:if test="keywordSet">
150
               <tr>
151
                 <td class="{$firstColStyle}">
152
                   <xsl:text>Keywords:</xsl:text>
153
                 </td>
154
                 <td class="{$secondColStyle}">
155
                 <xsl:for-each select="keywordSet">
156
                   <xsl:call-template name="resourcekeywordSet" >
157
                     <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
158
                     <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
159
                   </xsl:call-template>
160
                 </xsl:for-each>
161
                 </td>
162
               </tr>
163
             </xsl:if>
164

    
165
             <!-- put in the publication date -->
166
             <xsl:if test="./pubDate">
167
               <xsl:for-each select="pubDate">
168
                <xsl:call-template name="resourcepubDate" >
169
                  <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
170
                 </xsl:call-template>
171
               </xsl:for-each>
172
             </xsl:if>
173

    
174
             <!-- put in the language -->
175
             <xsl:if test="./language">
176
               <xsl:for-each select="language">
177
                 <xsl:call-template name="resourcelanguage" >
178
                   <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
179
                  </xsl:call-template>
180
               </xsl:for-each>
181
             </xsl:if>
182

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

    
206
     <!-- this section creates a two column table to present the involved
207
     parties in boxes across the entire page -->
208
     <table class="subGroup onehundred_percent">
209

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

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

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

    
285
       <!-- add in the metadataProviders using a two column table -->
286
       <xsl:if test="metadataProvider">
287
         <th colspan="2">Metadata Providers:</th>
288
         <xsl:for-each select="metadataProvider">
289
         <tr>
290
           <xsl:if test="position() mod 2 = 1">
291
             <td class="fortyfive_percent">
292
               <xsl:call-template name="party">
293
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
294
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
295
               </xsl:call-template>
296
             </td>
297
             <xsl:for-each select="following-sibling::metadataProvider[position()=1]">
298
             <td class="fortyfive_percent">
299
               <xsl:call-template name="party">
300
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
301
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
302
               </xsl:call-template>
303
             </td>
304
             </xsl:for-each>
305
           </xsl:if>
306
         </tr>
307
         </xsl:for-each>
308
       </xsl:if>
309

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

    
336
     <h3>Data Set Characteristics</h3>
337

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

    
379
     <!-- add in the method info -->
380
     <h3>Sampling, Processing and Quality Control Methods</h3>
381

    
382
     <table class="subGroup onehundred_percent">  
383
       <tr>
384
         <td colspan="2" class="onehundred_percent">
385
           <xsl:if test="./methods">
386
             <xsl:for-each select="./methods">
387
               <xsl:call-template name="datasetmethod">
388
                 <xsl:with-param name="methodfirstColStyle" select="$firstColStyle"/>
389
                 <xsl:with-param name="methodsecondColStyle" select="$secondColStyle"/>
390
               </xsl:call-template>
391
             </xsl:for-each>
392
           </xsl:if>
393
         </td>
394
       </tr>
395
     </table>
396

    
397
     <h3>Data Set Usage Rights</h3>
398

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

    
415
       <!-- add in the access control info -->
416
     <table class="subGroup onehundred_percent">  
417
       <tr>
418
         <td>
419
           <xsl:if test="access">
420
             <xsl:for-each select="access">
421
               <xsl:call-template name="access">
422
                 <xsl:with-param name="accessfirstColStyle" select="$firstColStyle"/>
423
                 <xsl:with-param name="accesssecondColStyle" select="$secondColStyle"/>
424
               </xsl:call-template>
425
             </xsl:for-each>
426
           </xsl:if>
427
         </td>
428
       </tr>
429
     </table>
430
  </xsl:template>
431

    
432
  <xsl:template name="datasetresource">
433
     <tr>
434
        <td colspan="2">
435
          <xsl:call-template name="resource">
436
            <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
437
            <xsl:with-param name="ressubHeaderStyle" select="$subHeaderStyle"/>
438
          </xsl:call-template>
439
       </td>
440
     </tr>
441
  </xsl:template>
442

    
443

    
444

    
445
  <xsl:template name="datasetpurpose">
446
    <xsl:for-each select="purpose">
447
      <tr><td colspan="2">
448
           <xsl:text>Purpose:</xsl:text>
449
        </td>
450
       </tr>
451
       <tr>
452
            <td  class="{$firstColStyle}">
453
            &#160;
454
            </td>
455
            <td>
456
              <xsl:call-template name="text">
457
                <xsl:with-param name="textfirstColStyle" select="$firstColStyle"/>
458
              </xsl:call-template>
459
            </td>
460
       </tr>
461
     </xsl:for-each>
462
  </xsl:template>
463

    
464
  <xsl:template name="datasetmaintenance">
465
    <xsl:for-each select="maintenance">
466
      <tr><td colspan="2">
467
        <xsl:text>Maintenance:</xsl:text>
468
     </td></tr>
469
     <xsl:call-template name="mantenancedescription"/>
470
      <tr>
471
          <td  class="{$firstColStyle}">
472
          Frequency:
473
          </td>
474
          <td class="{$secondColStyle}" >
475
           <xsl:value-of select="maintenanceUpdateFrequency"/>
476
          </td>
477
     </tr>
478
     <xsl:call-template name="datasetchangehistory"/>
479
   </xsl:for-each>
480
  </xsl:template>
481

    
482
  <xsl:template name="mantenancedescription">
483
   <xsl:for-each select="description">
484
     <tr>
485
          <td  class="{$firstColStyle}">
486
          Description:
487
          </td>
488
          <td>
489
            <xsl:call-template name="text">
490
               <xsl:with-param name="textfirstColStyle" select="$firstColStyle"/>
491
             </xsl:call-template>
492
          </td>
493
     </tr>
494
    </xsl:for-each>
495
  </xsl:template>
496

    
497
   <xsl:template name="datasetchangehistory">
498
   <xsl:if test="changeHistory">
499
     <tr>
500
          <td class="{$firstColStyle}">
501
          History:
502
          </td>
503
          <td>
504
            <table class="{$tabledefaultStyle}">
505
              <xsl:for-each select="changeHistory">
506
                <xsl:call-template name="historydetails"/>
507
              </xsl:for-each>
508
            </table>
509
          </td>
510
     </tr>
511
     </xsl:if>
512
   </xsl:template>
513

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

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

    
551
  <xsl:template name="datasetpublisher">
552
   <xsl:for-each select="publisher">
553
     <tr><td colspan="2">
554
        <xsl:text>Publisher:</xsl:text>
555
     </td></tr>
556
     <tr><td colspan="2">
557
       <xsl:call-template name="party">
558
              <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
559
       </xsl:call-template>
560
     </td></tr>
561
   </xsl:for-each>
562
  </xsl:template>
563

    
564
  <xsl:template name="datasetpubplace">
565
    <xsl:for-each select="pubPlace">
566
      <tr><td class="{$firstColStyle}">
567
           Publish Place:</td>
568
          <td class="{$secondColStyle}">
569
          <xsl:value-of select="."/>
570
          </td>
571
      </tr>
572
   </xsl:for-each>
573
  </xsl:template>
574

    
575
  <xsl:template name="datasetmethod">
576
     <xsl:for-each select=".">
577
        <xsl:call-template name="method">
578
          <xsl:with-param name="methodfirstColStyle" select="$firstColStyle"/>
579
        </xsl:call-template>
580
    </xsl:for-each>
581
  </xsl:template>
582

    
583
  <xsl:template name="datasetproject">
584
    <xsl:for-each select="project">
585
     <tr>
586
       <td colspan="2">
587
         <h3><xsl:text>Parent Project Information:</xsl:text></h3>
588
       </td>
589
     </tr>
590
     <tr>
591
       <td colspan="2">
592
       <xsl:call-template name="project">
593
         <xsl:with-param name="projectfirstColStyle" select="$firstColStyle"/>
594
       </xsl:call-template>
595
       </td>
596
     </tr>
597
    </xsl:for-each>
598
  </xsl:template>
599

    
600
   <xsl:template name="datasetaccess">
601
    <xsl:for-each select="access">
602
      <tr>
603
        <td colspan="2">
604
        <xsl:call-template name="access">
605
          <xsl:with-param name="accessfirstColStyle" select="$firstColStyle"/>
606
          <xsl:with-param name="accesssubHeaderStyle" select="$subHeaderStyle"/>
607
        </xsl:call-template>
608
        </td>
609
      </tr>
610
    </xsl:for-each>
611
  </xsl:template>
612

    
613

    
614

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

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

    
699
  <xsl:template match="text()" mode="dataset" />
700
  <xsl:template match="text()" mode="resource" />
701

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