Project

General

Profile

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

    
33

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

    
39
  <xsl:template match="dataset" mode="dataset">
40
      <xsl:choose>
41
         <xsl:when test="references!=''">
42
          <xsl:variable name="ref_id" select="references"/>
43
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
44
          <xsl:for-each select="$references">
45
             <xsl:call-template name="datasetmixed"/>
46
             <!--
47
             <xsl:call-template name="datasetresource"/>
48
             <xsl:call-template name="datasetaccess"/>
49
             <xsl:call-template name="datasetpurpose"/>
50
             <xsl:call-template name="datasetmaintenance"/>
51
             <xsl:call-template name="datasetcontact"/>
52
             <xsl:call-template name="datasetpublisher"/>
53
             <xsl:call-template name="datasetpubplace"/>
54
             <xsl:call-template name="datasetmethod"/>
55
             <xsl:call-template name="datasetproject"/>
56
             <xsl:if test="$withEntityLinks='1'">
57
               <xsl:call-template name="datasetentity"/>
58
             </xsl:if>
59
             -->
60
          </xsl:for-each>
61
       </xsl:when>
62
       <xsl:otherwise>
63
             <xsl:call-template name="datasetmixed"/>
64
             <!--
65
             <xsl:call-template name="datasetresource"/>
66
             <xsl:call-template name="datasetaccess"/>
67
             <xsl:call-template name="datasetpurpose"/>
68
             <xsl:call-template name="datasetmaintenance"/>
69
             <xsl:call-template name="datasetcontact"/>
70
             <xsl:call-template name="datasetpublisher"/>
71
             <xsl:call-template name="datasetpubplace"/>
72
             <xsl:call-template name="datasetmethod"/>
73
             <xsl:call-template name="datasetproject"/>
74
             <xsl:if test="$withEntityLinks='1'">
75
               <xsl:call-template name="datasetentity"/>
76
             </xsl:if>
77
             -->
78
       </xsl:otherwise>
79
      </xsl:choose>
80

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

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

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

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

    
204
       <!-- Type I datasets contain links to source data. put the distribution here  -->
205
       <table class="subGroup onehundred_percent">
206
         <xsl:if test="distribution/@id">
207

    
208

    
209
           <tr><td>
210
           <table class="{$tabledefaultStyle}">
211
           <th colspan="2">More information and access to these data:</th>
212
           <xsl:for-each select="distribution">   
213
             <tr>
214
               <td class="{$firstColStyle}">
215
                 <xsl:value-of select="@id"/><xsl:text>: </xsl:text>
216
               </td>
217
               <td class="{$secondColStyle}">
218
                 <a>
219
                   <xsl:attribute name="href">
220
                     <xsl:value-of select="online/url"/>
221
                   </xsl:attribute>
222
                   <xsl:value-of select="online/url"/>
223
                 </a>
224
               </td>
225
             </tr>
226
                 <!-- eml template. kinda ugly, and will it use @id ? -->
227
                 <!-- <xsl:if test="distribution">  -->
228
                 <!-- <xsl:call-template name="distribution">
229
                      <xsl:with-param name="distributionfirstColStyle" select="$firstColStyle"/> 
230
                      <xsl:with-param name="distributionsecondColStyle" select="$secondColStyle"/>
231
                    </xsl:call-template> -->
232
                    <!-- </xsl:if> -->
233
 
234
              </xsl:for-each>
235
            </table>
236
          </td></tr>
237

    
238
            </xsl:if> 
239
          </table>
240
          
241
  
242

    
243

    
244
     
245

    
246

    
247

    
248
     <h3>Involved Parties</h3>
249

    
250
     <!-- this section creates a two column table to present the involved
251
     parties in boxes across the entire page -->
252
     <table class="subGroup onehundred_percent">
253

    
254
       <!-- add in the creators using a two column table -->
255
       <xsl:if test="creator">
256
         <th colspan="2">Data Set Owners:</th>
257
         <xsl:for-each select="creator">
258
         <tr>
259
           <xsl:if test="position() mod 2 = 1">
260
             <td class="fortyfive_percent">
261
               <xsl:call-template name="party">
262
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
263
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
264
               </xsl:call-template>
265
             </td>
266
             <xsl:for-each select="following-sibling::creator[position()=1]">
267
             <td class="fortyfive_percent">
268
               <xsl:call-template name="party">
269
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
270
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
271
               </xsl:call-template>
272
             </td>
273
             </xsl:for-each>
274
           </xsl:if>
275
         </tr>
276
         </xsl:for-each>
277
       </xsl:if>
278

    
279
       <!-- add in the contacts using a two column table -->
280
       <xsl:if test="contact">
281
         <th colspan="2">Data Set Contacts:</th>
282
         <xsl:for-each select="contact">
283
         <tr>
284
           <xsl:if test="position() mod 2 = 1">
285
             <td class="fortyfive_percent">
286
               <xsl:call-template name="party">
287
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
288
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
289
               </xsl:call-template>
290
             </td>
291
             <xsl:for-each select="following-sibling::contact[position()=1]">
292
             <td class="fortyfive_percent">
293
               <xsl:call-template name="party">
294
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
295
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
296
               </xsl:call-template>
297
             </td>
298
             </xsl:for-each>
299
           </xsl:if>
300
         </tr>
301
         </xsl:for-each>
302
       </xsl:if>
303

    
304
       <!-- add in the associatedParty using a two column table -->
305
       <xsl:if test="associatedParty">
306
         <th colspan="2">Associated Parties:</th>
307
         <xsl:for-each select="associatedParty">
308
         <tr>
309
           <xsl:if test="position() mod 2 = 1">
310
             <td class="fortyfive_percent">
311
               <xsl:call-template name="party">
312
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
313
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
314
               </xsl:call-template>
315
             </td>
316
             <xsl:for-each select="following-sibling::associatedParty[position()=1]">
317
             <td class="fortyfive_percent">
318
               <xsl:call-template name="party">
319
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
320
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
321
               </xsl:call-template>
322
             </td>
323
             </xsl:for-each>
324
           </xsl:if>
325
         </tr>
326
         </xsl:for-each>
327
       </xsl:if>
328

    
329
       <!-- add in the metadataProviders using a two column table -->
330
       <xsl:if test="metadataProvider">
331
         <th colspan="2">Metadata Providers:</th>
332
         <xsl:for-each select="metadataProvider">
333
         <tr>
334
           <xsl:if test="position() mod 2 = 1">
335
             <td class="fortyfive_percent">
336
               <xsl:call-template name="party">
337
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
338
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
339
               </xsl:call-template>
340
             </td>
341
             <xsl:for-each select="following-sibling::metadataProvider[position()=1]">
342
             <td class="fortyfive_percent">
343
               <xsl:call-template name="party">
344
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
345
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
346
               </xsl:call-template>
347
             </td>
348
             </xsl:for-each>
349
           </xsl:if>
350
         </tr>
351
         </xsl:for-each>
352
       </xsl:if>
353

    
354
       <!-- add in the publishers using a two column table -->
355
       <xsl:if test="publisher">
356
         <th colspan="2">Data Set Publishers:</th>
357
         <xsl:for-each select="publisher">
358
         <tr>
359
           <xsl:if test="position() mod 2 = 1">
360
             <td class="fortyfive_percent">
361
               <xsl:call-template name="party">
362
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
363
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
364
               </xsl:call-template>
365
             </td>
366
             <xsl:for-each select="following-sibling::publisher[position()=1]">
367
             <td class="fortyfive_percent">
368
               <xsl:call-template name="party">
369
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
370
                 <xsl:with-param name="partysecondColStyle" select="$secondColStyle"/>
371
               </xsl:call-template>
372
             </td>
373
             </xsl:for-each>
374
           </xsl:if>
375
         </tr>
376
         </xsl:for-each>
377
       </xsl:if>
378
     </table>
379

    
380
     <h3>Data Set Coverage</h3>
381

    
382
       <!-- add in the coverage info -->
383
     <table class="subGroup onehundred_percent">  
384
       <tr>
385
       <!-- add in the geographic coverage info -->
386
         <td class="fortyfive_percent">
387
           <xsl:if test="./coverage/geographicCoverage">
388
             <xsl:for-each select="./coverage/geographicCoverage">
389
               <xsl:call-template name="geographicCoverage">
390
                 <xsl:with-param name="firstColStyle" select="$firstColStyle"/>
391
                 <xsl:with-param name="secondColStyle" select="$secondColStyle"/>
392
               </xsl:call-template>
393
             </xsl:for-each>
394
           </xsl:if>
395
         </td>
396
       <!-- add in the temporal coverage info -->
397
         <td class="fortyfive_percent">
398
           <xsl:if test="./coverage/temporalCoverage">
399
             <xsl:for-each select="./coverage/temporalCoverage">
400
               <xsl:call-template name="temporalCoverage">
401
                 <xsl:with-param name="firstColStyle" select="$firstColStyle"/>
402
                 <xsl:with-param name="secondColStyle" select="$secondColStyle"/>
403
               </xsl:call-template>
404
             </xsl:for-each>
405
           </xsl:if>
406
         </td>
407
       </tr>
408
       <tr>
409
       <!-- add in the taxonomic coverage info -->
410
         <td colspan="2" class="onehundred_percent">
411
           <xsl:if test="./coverage/taxonomicCoverage">
412
             <xsl:for-each select="./coverage/taxonomicCoverage">
413
               <xsl:call-template name="taxonomicCoverage">
414
                 <xsl:with-param name="firstColStyle" select="$firstColStyle"/>
415
                 <xsl:with-param name="secondColStyle" select="$secondColStyle"/>
416
               </xsl:call-template>
417
             </xsl:for-each>
418
           </xsl:if>
419
         </td>
420
       </tr>
421
     </table>
422

    
423
     <!-- add in the method info -->
424
     <h3>Sampling, Processing and Quality Control Methods</h3>
425
     <!-- need to get protocol/distribution/online/url to show -->
426
     <table class="subGroup onehundred_percent">  
427
       <tr>
428
         <td colspan="2" class="onehundred_percent">
429
           <xsl:if test="./methods">
430
             <xsl:for-each select="./methods">
431
               <xsl:call-template name="datasetmethod">
432
                 <xsl:with-param name="methodfirstColStyle" select="$firstColStyle"/>
433
                 <xsl:with-param name="methodsecondColStyle" select="$secondColStyle"/>
434
               </xsl:call-template>
435
             </xsl:for-each>
436
           </xsl:if>
437
         </td>
438
       </tr>
439
     </table>
440

    
441
     <h3>Data Set Usage Rights</h3>
442

    
443
       <!-- add in the intellectiual rights info -->
444
     <table class="subGroup onehundred_percent">  
445
       <tr>
446
         <td>
447
           <xsl:if test="intellectualRights">
448
             <xsl:for-each select="intellectualRights">
449
               <xsl:call-template name="resourceintellectualRights">
450
                 <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
451
                 <xsl:with-param name="ressecondColStyle" select="$secondColStyle"/>
452
               </xsl:call-template>
453
             </xsl:for-each>
454
           </xsl:if>
455
         </td>
456
       </tr>
457
     </table>
458

    
459
       <!-- add in the access control info -->
460
     <table class="subGroup onehundred_percent">  
461
       <tr>
462
         <td>
463
           <xsl:if test="preceding-sibling::access">
464
             <xsl:for-each select="preceding-sibling::access">
465
               <xsl:call-template name="access">
466
                 <xsl:with-param name="accessfirstColStyle" select="$firstColStyle"/>
467
                 <xsl:with-param name="accesssecondColStyle" select="$secondColStyle"/>
468
               </xsl:call-template>
469
             </xsl:for-each>
470
           </xsl:if>
471
         </td>
472
       </tr>
473
     </table>
474
  </xsl:template>
475

    
476
  <xsl:template name="datasetresource">
477
     <tr>
478
        <td colspan="2">
479
          <xsl:call-template name="resource">
480
            <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
481
            <xsl:with-param name="ressubHeaderStyle" select="$subHeaderStyle"/>
482
          </xsl:call-template>
483
       </td>
484
     </tr>
485
  </xsl:template>
486

    
487

    
488

    
489
  <xsl:template name="datasetpurpose">
490
    <xsl:for-each select="purpose">
491
      <tr><td colspan="2">
492
           <xsl:text>Purpose:</xsl:text>
493
        </td>
494
       </tr>
495
       <tr>
496
            <td  class="{$firstColStyle}">
497
            &#160;
498
            </td>
499
            <td>
500
              <xsl:call-template name="text">
501
                <xsl:with-param name="textfirstColStyle" select="$firstColStyle"/>
502
              </xsl:call-template>
503
            </td>
504
       </tr>
505
     </xsl:for-each>
506
  </xsl:template>
507

    
508
  <xsl:template name="datasetmaintenance">
509
    <xsl:for-each select="maintenance">
510
      <tr><td colspan="2">
511
        <xsl:text>Maintenance:</xsl:text>
512
     </td></tr>
513
     <xsl:call-template name="mantenancedescription"/>
514
      <tr>
515
          <td  class="{$firstColStyle}">
516
          Frequency:
517
          </td>
518
          <td class="{$secondColStyle}" >
519
           <xsl:value-of select="maintenanceUpdateFrequency"/>
520
          </td>
521
     </tr>
522
     <xsl:call-template name="datasetchangehistory"/>
523
   </xsl:for-each>
524
  </xsl:template>
525

    
526
  <xsl:template name="mantenancedescription">
527
   <xsl:for-each select="description">
528
     <tr>
529
          <td  class="{$firstColStyle}">
530
          Description:
531
          </td>
532
          <td>
533
            <xsl:call-template name="text">
534
               <xsl:with-param name="textfirstColStyle" select="$firstColStyle"/>
535
             </xsl:call-template>
536
          </td>
537
     </tr>
538
    </xsl:for-each>
539
  </xsl:template>
540

    
541
   <xsl:template name="datasetchangehistory">
542
   <xsl:if test="changeHistory">
543
     <tr>
544
          <td class="{$firstColStyle}">
545
          History:
546
          </td>
547
          <td>
548
            <table class="{$tabledefaultStyle}">
549
              <xsl:for-each select="changeHistory">
550
                <xsl:call-template name="historydetails"/>
551
              </xsl:for-each>
552
            </table>
553
          </td>
554
     </tr>
555
     </xsl:if>
556
   </xsl:template>
557

    
558
   <xsl:template name="historydetails">
559
        <tr><td class="{$firstColStyle}">
560
            scope:</td>
561
            <td class="{$secondColStyle}">
562
            <xsl:value-of select="changeScope"/>
563
        </td></tr>
564
        <tr><td class="{$firstColStyle}">
565
            old value:</td>
566
            <td class="{$secondColStyle}">
567
            <xsl:value-of select="oldValue"/>
568
        </td></tr>
569
        <tr><td class="{$firstColStyle}">
570
            change date:</td>
571
            <td class="{$secondColStyle}">
572
            <xsl:value-of select="changeDate"/>
573
        </td></tr>
574
        <xsl:if test="comment and normalize-space(comment)!=''">
575
          <tr><td class="{$firstColStyle}">
576
            comment:</td><td class="{$secondColStyle}">
577
            <xsl:value-of select="comment"/>
578
          </td></tr>
579
        </xsl:if>
580
  </xsl:template>
581

    
582

    
583
  
584

    
585

    
586

    
587

    
588
  <xsl:template name="datasetcontact">
589
    <tr><td colspan="2">
590
        <xsl:text>Contact:</xsl:text>
591
     </td></tr>
592
    <xsl:for-each select="contact">
593
     <tr><td colspan="2">
594
       <xsl:call-template name="party">
595
              <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
596
       </xsl:call-template>
597
     </td></tr>
598
    </xsl:for-each>
599
  </xsl:template>
600

    
601
  <xsl:template name="datasetpublisher">
602
   <xsl:for-each select="publisher">
603
     <tr><td colspan="2">
604
        <xsl:text>Publisher:</xsl:text>
605
     </td></tr>
606
     <tr><td colspan="2">
607
       <xsl:call-template name="party">
608
              <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
609
       </xsl:call-template>
610
     </td></tr>
611
   </xsl:for-each>
612
  </xsl:template>
613

    
614
  <xsl:template name="datasetpubplace">
615
    <xsl:for-each select="pubPlace">
616
      <tr><td class="{$firstColStyle}">
617
           Publish Place:</td>
618
          <td class="{$secondColStyle}">
619
          <xsl:value-of select="."/>
620
          </td>
621
      </tr>
622
   </xsl:for-each>
623
  </xsl:template>
624

    
625
  <xsl:template name="datasetmethod">
626
     <xsl:for-each select=".">
627
        <xsl:call-template name="method">
628
          <xsl:with-param name="methodfirstColStyle" select="$firstColStyle"/>
629
        </xsl:call-template>
630
    </xsl:for-each>
631
  </xsl:template>
632

    
633
  <xsl:template name="datasetproject">
634
    <xsl:for-each select="project">
635
     <tr>
636
       <td colspan="2">
637
         <h3><xsl:text>Parent Project Information:</xsl:text></h3>
638
       </td>
639
     </tr>
640
     <tr>
641
       <td colspan="2">
642
       <xsl:call-template name="project">
643
         <xsl:with-param name="projectfirstColStyle" select="$firstColStyle"/>
644
       </xsl:call-template>
645
       </td>
646
     </tr>
647
    </xsl:for-each>
648
  </xsl:template>
649

    
650
<!--  never used ?
651
   <xsl:template name="distribtutionaccess">
652
    <xsl:for-each select="distribution/access">
653
      <tr>
654
        <td colspan="2">
655
        <xsl:call-template name="access">
656
          <xsl:with-param name="accessfirstColStyle" select="$firstColStyle"/>
657
          <xsl:with-param name="accesssubHeaderStyle" select="$subHeaderStyle"/>
658
        </xsl:call-template>
659
        </td>
660
      </tr>
661
    </xsl:for-each>
662
  </xsl:template>
663
-->
664

    
665

    
666
  <xsl:template name="datasetentity" >
667
   <xsl:if test="dataTable or spatialRaster or spatialVector or storedProcedures or view or otherEntity">
668
      <tr>
669
        <th>
670
        <xsl:text>Descriptions of Data Tables, Images or Other Entities:</xsl:text>
671
        </th>
672
      </tr>
673
   </xsl:if>
674
    <xsl:for-each select="dataTable">
675
      <xsl:call-template name="entityurl">
676
        <xsl:with-param name="type">dataTable</xsl:with-param>
677
        <xsl:with-param name="showtype">Data Table</xsl:with-param>
678
        <xsl:with-param name="index" select="position()"/>
679
      </xsl:call-template>
680
   </xsl:for-each>
681
   <xsl:for-each select="spatialRaster">
682
     <xsl:call-template name="entityurl">
683
        <xsl:with-param name="type">spatialRaster</xsl:with-param>
684
        <xsl:with-param name="showtype">Spatial Raster</xsl:with-param>
685
        <xsl:with-param name="index" select="position()"/>
686
      </xsl:call-template>
687
   </xsl:for-each>
688
   <xsl:for-each select="spatialVector">
689
      <xsl:call-template name="entityurl">
690
        <xsl:with-param name="type">spatialVector</xsl:with-param>
691
        <xsl:with-param name="showtype">Spatial Vector</xsl:with-param>
692
        <xsl:with-param name="index" select="position()"/>
693
      </xsl:call-template>
694
   </xsl:for-each>
695
   <xsl:for-each select="storedProcedure">
696
     <xsl:call-template name="entityurl">
697
        <xsl:with-param name="type">storedProcedure</xsl:with-param>
698
        <xsl:with-param name="showtype">Stored Procedure</xsl:with-param>
699
        <xsl:with-param name="index" select="position()"/>
700
      </xsl:call-template>
701
   </xsl:for-each>
702
   <xsl:for-each select="view">
703
      <xsl:call-template name="entityurl">
704
        <xsl:with-param name="type">view</xsl:with-param>
705
        <xsl:with-param name="showtype">View</xsl:with-param>
706
        <xsl:with-param name="index" select="position()"/>
707
      </xsl:call-template>
708
   </xsl:for-each>
709
   <xsl:for-each select="otherEntity">
710
      <xsl:call-template name="entityurl">
711
        <xsl:with-param name="type">otherEntity</xsl:with-param>
712
        <xsl:with-param name="showtype">Other Entity</xsl:with-param>
713
        <xsl:with-param name="index" select="position()"/>
714
      </xsl:call-template>
715
   </xsl:for-each>
716
  </xsl:template>
717

    
718

    
719

    
720
  <!-- 2 col structure, maybe a link to dataTable in col2-->
721
  <xsl:template name="entityurl">
722
     <xsl:param name="showtype"/>
723
     <xsl:param name="type"/>
724
     <xsl:param name="index"/>
725
      <xsl:choose>
726
         <xsl:when test="references!=''">
727
          <xsl:variable name="ref_id" select="references"/>
728
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
729
          <xsl:for-each select="$references">
730
            <tr>
731
              <td class="{$firstColStyle}">
732
              <a>
733
                <xsl:attribute name="href">
734
                  <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"/>
735
                </xsl:attribute>
736
                 <xsl:text>Information for </xsl:text>
737
                 <xsl:value-of select="$showtype"/><xsl:text>: </xsl:text>
738
                 <xsl:value-of select="./entityName"/> 
739
							</a>
740
								 <small>
741
                  <xsl:text> (</xsl:text><xsl:value-of select="./entityDescription"/><xsl:text>)</xsl:text>
742
								</small>
743
            </td>
744
         </tr>
745
          </xsl:for-each>
746
        </xsl:when>
747
        <xsl:otherwise>
748
         <tr>
749
            <td class="{$firstColStyle}">
750
              <a>
751
                <xsl:attribute name="href">
752
                  <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"/>
753
                </xsl:attribute>
754
								<xsl:text>Information for </xsl:text>
755
                <xsl:value-of select="$showtype"/><xsl:text>: </xsl:text>
756
                <xsl:value-of select="./entityName"/> 
757
							</a>
758
							<small>
759
                  <xsl:text> (</xsl:text><xsl:value-of select="./entityDescription"/><xsl:text>)</xsl:text>
760
							</small>
761
            </td>
762
            <td class="{$secondColStyle}">
763
              <!-- can you put a link to distribution here? -->
764
             
765
            </td>
766

    
767

    
768
         </tr>
769
       </xsl:otherwise>
770
     </xsl:choose>
771
  </xsl:template>
772

    
773
  <xsl:template match="text()" mode="dataset" />
774
  <xsl:template match="text()" mode="resource" />
775

    
776
</xsl:stylesheet>
(16-16/58)