Project

General

Profile

metacat / lib / style / skins / metacatui / eml-2 / emlroot.xsl @ 7982

1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Matt Jones
5
  *    Copyright: 2000 Regents of the University of California and the
6
  *         National Center for Ecological Analysis and Synthesis
7
  *  For Details: http://www.nceas.ucsb.edu/
8
  *
9
  *   '$Author: leinfelder $'
10
  *     '$Date: 2013-07-15 10:37:09 -0700 (Mon, 15 Jul 2013) $'
11
  * '$Revision: 7982 $'
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
  <xsl:import href="eml-access.xsl"/>
34
  <xsl:import href="eml-additionalmetadata.xsl"/>
35
  <xsl:import href="eml-attribute.xsl"/>
36
  <xsl:import href="eml-attribute-enumeratedDomain.xsl"/>
37
  <xsl:import href="eml-constraint.xsl"/>
38
  <xsl:import href="eml-coverage.xsl"/>
39
  <xsl:import href="eml-dataset.xsl"/>
40
  <xsl:import href="eml-datatable.xsl"/>
41
  <xsl:import href="eml-distribution.xsl"/>
42
  <xsl:import href="eml-entity.xsl"/>
43
  <xsl:import href="eml-identifier.xsl"/>
44
  <xsl:import href="eml-literature.xsl"/>
45
  <xsl:import href="eml-method.xsl"/>
46
  <xsl:import href="eml-otherentity.xsl"/>
47
  <xsl:import href="eml-party.xsl"/>
48
  <xsl:import href="eml-physical.xsl"/>
49
  <xsl:import href="eml-project.xsl"/>
50
  <xsl:import href="eml-protocol.xsl"/>
51
  <xsl:import href="eml-resource.xsl"/>
52
  <xsl:import href="eml-settings.xsl"/>
53
  <xsl:import href="eml-software.xsl"/>
54
  <xsl:import href="eml-spatialraster.xsl"/>
55
  <xsl:import href="eml-spatialvector.xsl"/>
56
  <xsl:import href="eml-storedprocedure.xsl"/>
57
  <xsl:import href="eml-text.xsl"/>
58
  <xsl:import href="eml-view.xsl"/>
59

    
60
  <!-- global variables to store id node set in case to be referenced-->
61
  <xsl:variable name="ids" select="//*[@id!='']"/>
62

    
63
   <xsl:template match="*[local-name()='eml']">
64
     <xsl:for-each select="dataset">
65
       <xsl:call-template name="emldataset"/>
66
     </xsl:for-each>
67
     <xsl:for-each select="citation">
68
       <xsl:call-template name="emlcitation"/>
69
     </xsl:for-each>
70
     <xsl:for-each select="software">
71
       <xsl:call-template name="emlsoftware"/>
72
     </xsl:for-each>
73
     <xsl:for-each select="protocol">
74
       <xsl:call-template name="emlprotocol"/>
75
     </xsl:for-each>
76
     <xsl:for-each select="access">
77
		<xsl:call-template name="topaccess"/>
78
	 </xsl:for-each>
79
     <!-- Additional metadata-->
80
     <xsl:choose>
81
       <xsl:when test="$displaymodule='additionalmetadata' or $displaymodule='printall'">
82
         <xsl:for-each select="additionalMetadata">
83
           <xsl:if test="$additionalmetadataindex=position()">
84
                 <xsl:call-template name="additionalmetadatapart"/>
85
            </xsl:if>
86
         </xsl:for-each>
87
       </xsl:when>
88
       <xsl:otherwise>
89
         <xsl:if test="$displaymodule='dataset' or $displaymodule='printall'">
90
           <xsl:if test="$withAdditionalMetadataLink='1'">
91
             <xsl:for-each select="additionalMetadata">
92
               <div class="{$tabledefaultStyle}">
93
                 <xsl:call-template name="additionalmetadataURL">
94
                    <xsl:with-param name="index" select="position()"/>
95
                  </xsl:call-template>
96
               </div>
97
             </xsl:for-each>
98
           </xsl:if>
99
         </xsl:if>
100
       </xsl:otherwise>
101
     </xsl:choose>
102
     <!-- xml format-->
103
     <xsl:if test="$displaymodule='dataset'">
104
       <xsl:if test="$withOriginalXMLLink='1'">
105
			<tr>
106
				<td colspan="2">
107
			       	<table class="subGroup subGroup_border onehundred_percent">
108
			         	<xsl:call-template name="xml"/>
109
			         </table>
110
				</td>
111
			</tr>  
112
       </xsl:if>
113
     </xsl:if>
114
   </xsl:template>
115

    
116
   <!--********************************************************
117
                       dataset part
118
       ********************************************************-->
119

    
120
   <xsl:template name="emldataset">
121
    <xsl:if test="$displaymodule='dataset'">
122
    	<div>
123
			<xsl:call-template name="datasetpart"/>
124
		</div>	
125
    </xsl:if>
126
    <xsl:if test="$displaymodule='entity'">
127
       <xsl:call-template name="entitypart"/>
128
    </xsl:if>
129
    <xsl:if test="$displaymodule='attribute'">
130
       <xsl:call-template name="attributepart"/>
131
    </xsl:if>
132
    <xsl:if test="$displaymodule='attributedomain'">
133
       <xsl:call-template name="datasetattributedomain"/>
134
    </xsl:if>
135
    <xsl:if test="$displaymodule='attributecoverage'">
136
       <xsl:call-template name="datasetattributecoverage"/>
137
    </xsl:if>
138
    <xsl:if test="$displaymodule='attributemethod'">
139
       <xsl:call-template name="datasetattributemethod"/>
140
    </xsl:if>
141
    <xsl:if test="$displaymodule='inlinedata'">
142
       <xsl:call-template name="emlinlinedata"/>
143
    </xsl:if>
144
    <xsl:if test="$displaymodule='attributedetail'">
145
       <xsl:call-template name="entityparam"/>
146
    </xsl:if>
147
    <xsl:if test="$displaymodule='printall'">
148
		<xsl:call-template name="printalltemplate"/>
149
	</xsl:if>
150
   </xsl:template>
151

    
152
   <!--*************** Data set diaplay *************-->
153
   <xsl:template name="datasetpart">
154
       <xsl:apply-templates select="." mode="dataset"/>
155
   </xsl:template>
156

    
157
   <!--************ Entity diplay *****************-->
158
   <xsl:template name="entitypart">
159
       <xsl:choose>
160
         <xsl:when test="references!=''">
161
            <xsl:variable name="ref_id" select="references"/>
162
            <xsl:variable name="references" select="$ids[@id=$ref_id]" />
163
            <xsl:for-each select="$references">
164
               <xsl:call-template name="entitypartcommon"/>
165
            </xsl:for-each>
166
         </xsl:when>
167
         <xsl:otherwise>
168
            <xsl:call-template name="entitypartcommon"/>
169
        </xsl:otherwise>
170
   </xsl:choose>
171
    </xsl:template>
172

    
173

    
174
    <xsl:template name="entitypartcommon">
175
      <tr><th colspan="2">
176
      Data Object Description
177
      </th></tr>
178
      <xsl:call-template name="identifier">
179
          <xsl:with-param name="packageID" select="../@packageId"/>
180
          <xsl:with-param name="system" select="../@system"/>
181
      </xsl:call-template>
182
      <tr>
183
     <td colspan="2">
184
        <!-- find the subtree to process -->
185
       <xsl:call-template name="entityparam"/>
186
     </td>
187
      </tr>
188
   </xsl:template>
189

    
190
   <!--************ Attribute display *****************-->
191
   <xsl:template name="attributedetailpart">
192
   </xsl:template>
193

    
194
    <xsl:template name="attributepart">
195
      <tr><td>
196
      <h3>Attributes Description</h3>
197
      </td></tr>
198
      <tr>
199
     <td>
200
        <!-- find the subtree to process -->
201
      <xsl:if test="$entitytype='dataTable'">
202
        <xsl:for-each select="dataTable">
203
            <xsl:if test="position()=$entityindex">
204
                <xsl:for-each select="attributeList">
205
                   <xsl:call-template name="attributelist">
206
                      <xsl:with-param name="docid" select="$docid"/>
207
                      <xsl:with-param name="entitytype" select="$entitytype"/>
208
                      <xsl:with-param name="entityindex" select="$entityindex"/>
209
                   </xsl:call-template>
210
                </xsl:for-each>
211
            </xsl:if>
212
        </xsl:for-each>
213
      </xsl:if>
214
    </td>
215
      </tr>
216
   </xsl:template>
217

    
218
   <!--************************Attribute Domain display module************************-->
219
   <xsl:template name="datasetattributedomain">
220
      <tr><td>
221
      <h3>Attribute Domain</h3>
222
      </td></tr>
223
      <tr>
224
     <td>
225
       <!-- find the subtree to process -->
226
       <xsl:call-template name="entityparam"/>
227
    </td>
228
      </tr>
229
   </xsl:template>
230

    
231

    
232
   <!--************************Attribute Method display module************************-->
233
   <xsl:template name="datasetattributemethod">
234
      <tr><td>
235
      <h3>Attribute Method</h3>
236
      </td></tr>
237
      <tr>
238
     <td>
239
       <!-- find the subtree to process -->
240
       <xsl:call-template name="entityparam"/>
241
    </td>
242
      </tr>
243
   </xsl:template>
244

    
245

    
246
   <!--************************Attribute Coverage display module************************-->
247
   <xsl:template name="datasetattributecoverage">
248
     <tr><td>
249
      <h3>Attribute Coverage</h3>
250
      </td></tr>
251
      <tr>
252
     <td>
253
       <!-- find the subtree to process -->
254
       <xsl:call-template name="entityparam"/>
255
    </td>
256
      </tr>
257
   </xsl:template>
258

    
259
   <!--************************Print all display module************************-->
260
   <xsl:template name="printalltemplate">
261
 	<!-- find the subtree to process -->
262
             <xsl:call-template name="datasetpart"/>
263
   </xsl:template>
264

    
265
   <xsl:template name="entityparam">
266
     <xsl:choose>
267
      <xsl:when test="$entitytype=''">
268
        <xsl:variable name="dataTableCount" select="0"/>
269
        <xsl:variable name="spatialRasterCount" select="0"/>
270
        <xsl:variable name="spatialVectorCount" select="0"/>
271
        <xsl:variable name="storedProcedureCount" select="0"/>
272
        <xsl:variable name="viewCount" select="0"/>
273
        <xsl:variable name="otherEntityCount" select="0"/>
274
        <xsl:for-each select="dataTable|spatialRaster|spatialVector|storedProcedure|view|otherEntity">
275

    
276
        <xsl:if test="'dataTable' = name()">
277
           <xsl:variable name="currentNode" select="."/>
278
           <xsl:variable name="dataTableCount">
279
            <xsl:for-each select="../dataTable">
280
                  <xsl:if test=". = $currentNode">
281
                <xsl:value-of select="position()"/>
282
              </xsl:if>
283
            </xsl:for-each>
284
           </xsl:variable>
285
           <xsl:if test="position() = $entityindex">
286
             <xsl:choose>
287
               <xsl:when test="$displaymodule='attributedetail'">
288
                 <xsl:for-each select="attributeList">
289
                   <xsl:call-template name="singleattribute">
290
                    <xsl:with-param name="attributeindex" select="$attributeindex"/>
291
                    <xsl:with-param name="docid" select="$docid"/>
292
                    <xsl:with-param name="entitytype" select="'dataTable'"/>
293
                    <xsl:with-param name="entityindex" select="$dataTableCount"/>
294
                   </xsl:call-template>
295
                 </xsl:for-each>
296
               </xsl:when>
297
               <xsl:otherwise>
298
                 <xsl:for-each select="../.">
299
                   <xsl:call-template name="chooseentity">
300
                    <xsl:with-param name="entitytype" select="'dataTable'"/>
301
                    <xsl:with-param name="entityindex" select="$dataTableCount"/>
302
                   </xsl:call-template>
303
                  </xsl:for-each>
304
                  </xsl:otherwise>
305
                 </xsl:choose>
306
           </xsl:if>
307
        </xsl:if>
308

    
309
        <xsl:if test="'spatialRaster' = name()">
310
          <xsl:variable name="currentNode" select="."/>
311
           <xsl:variable name="spatialRasterCount">
312
            <xsl:for-each select="../spatialRaster">
313
                  <xsl:if test=". = $currentNode">
314
                <xsl:value-of select="position()"/>
315
              </xsl:if>
316
            </xsl:for-each>
317
           </xsl:variable>
318
            <xsl:if test="position() = $entityindex">
319
           <xsl:choose>
320
               <xsl:when test="$displaymodule='attributedetail'">
321
                 <xsl:for-each select="attributeList">
322
                   <xsl:call-template name="singleattribute">
323
                    <xsl:with-param name="attributeindex" select="$attributeindex"/>
324
                    <xsl:with-param name="docid" select="$docid"/>
325
                    <xsl:with-param name="entitytype" select="'spatialRaster'"/>
326
                    <xsl:with-param name="entityindex" select="$spatialRasterCount"/>
327
                   </xsl:call-template>
328
                 </xsl:for-each>
329
               </xsl:when>
330
               <xsl:otherwise>
331
                 <xsl:for-each select="../.">
332
                   <xsl:call-template name="chooseentity">
333
                    <xsl:with-param name="entitytype" select="'spatialRaster'"/>
334
                    <xsl:with-param name="entityindex" select="$spatialRasterCount"/>
335
                   </xsl:call-template>
336
                  </xsl:for-each>
337
                  </xsl:otherwise>
338
                 </xsl:choose>
339
            </xsl:if>
340
        </xsl:if>
341

    
342
        <xsl:if test="'spatialVector' = name()">
343
          <xsl:variable name="currentNode" select="."/>
344
           <xsl:variable name="spatialVectorCount">
345
            <xsl:for-each select="../spatialVector">
346
                  <xsl:if test=". = $currentNode">
347
                <xsl:value-of select="position()"/>
348
              </xsl:if>
349
            </xsl:for-each>
350
           </xsl:variable>
351
           <xsl:if test="position() = $entityindex">
352
             <xsl:choose>
353
               <xsl:when test="$displaymodule='attributedetail'">
354
                 <xsl:for-each select="attributeList">
355
                   <xsl:call-template name="singleattribute">
356
                    <xsl:with-param name="attributeindex" select="$attributeindex"/>
357
                    <xsl:with-param name="docid" select="$docid"/>
358
                    <xsl:with-param name="entitytype" select="'spatialVector'"/>
359
                    <xsl:with-param name="entityindex" select="$spatialVectorCount"/>
360
                   </xsl:call-template>
361
                 </xsl:for-each>
362
               </xsl:when>
363
               <xsl:otherwise>
364
                 <xsl:for-each select="../.">
365
                   <xsl:call-template name="chooseentity">
366
                    <xsl:with-param name="entitytype" select="'spatialVector'"/>
367
                    <xsl:with-param name="entityindex" select="$spatialVectorCount"/>
368
                   </xsl:call-template>
369
                  </xsl:for-each>
370
                  </xsl:otherwise>
371
                 </xsl:choose>
372
           </xsl:if>
373
        </xsl:if>
374

    
375
        <xsl:if test="'storedProcedure' = name()">
376
          <xsl:variable name="currentNode" select="."/>
377
           <xsl:variable name="storedProcedureCount">
378
            <xsl:for-each select="../storedProcedure">
379
                  <xsl:if test=". = $currentNode">
380
                <xsl:value-of select="position()"/>
381
              </xsl:if>
382
            </xsl:for-each>
383
           </xsl:variable>
384
           <xsl:if test="position() = $entityindex">
385
             <xsl:choose>
386
               <xsl:when test="$displaymodule='attributedetail'">
387
                 <xsl:for-each select="attributeList">
388
                   <xsl:call-template name="singleattribute">
389
                    <xsl:with-param name="attributeindex" select="$attributeindex"/>
390
                    <xsl:with-param name="docid" select="$docid"/>
391
                    <xsl:with-param name="entitytype" select="'storedProcedure'"/>
392
                    <xsl:with-param name="entityindex" select="$storedProcedureCount"/>
393
                   </xsl:call-template>
394
                 </xsl:for-each>
395
               </xsl:when>
396
               <xsl:otherwise>
397
                 <xsl:for-each select="../.">
398
                   <xsl:call-template name="chooseentity">
399
                    <xsl:with-param name="entitytype" select="'storedProcedure'"/>
400
                    <xsl:with-param name="entityindex" select="$storedProcedureCount"/>
401
                   </xsl:call-template>
402
                  </xsl:for-each>
403
                  </xsl:otherwise>
404
              </xsl:choose>
405
           </xsl:if>
406
        </xsl:if>
407

    
408
        <xsl:if test="'view' = name()">
409
          <xsl:variable name="currentNode" select="."/>
410
           <xsl:variable name="viewCount">
411
            <xsl:for-each select="../view">
412
                  <xsl:if test=". = $currentNode">
413
                <xsl:value-of select="position()"/>
414
              </xsl:if>
415
            </xsl:for-each>
416
           </xsl:variable>
417
           <xsl:if test="position() = $entityindex">
418
            <xsl:choose>
419
               <xsl:when test="$displaymodule='attributedetail'">
420
                 <xsl:for-each select="attributeList">
421
                   <xsl:call-template name="singleattribute">
422
                    <xsl:with-param name="attributeindex" select="$attributeindex"/>
423
                    <xsl:with-param name="docid" select="$docid"/>
424
                    <xsl:with-param name="entitytype" select="'view'"/>
425
                    <xsl:with-param name="entityindex" select="$viewCount"/>
426
                   </xsl:call-template>
427
                 </xsl:for-each>
428
               </xsl:when>
429
               <xsl:otherwise>
430
                 <xsl:for-each select="../.">
431
                   <xsl:call-template name="chooseentity">
432
                    <xsl:with-param name="entitytype" select="'view'"/>
433
                    <xsl:with-param name="entityindex" select="$viewCount"/>
434
                   </xsl:call-template>
435
                  </xsl:for-each>
436
                  </xsl:otherwise>
437
                 </xsl:choose>
438
            </xsl:if>
439
        </xsl:if>
440

    
441
        <xsl:if test="'otherEntityTable' = name()">
442
          <xsl:variable name="currentNode" select="."/>
443
           <xsl:variable name="otherEntityCount">
444
            <xsl:for-each select="../otherEntity">
445
                  <xsl:if test=". = $currentNode">
446
                <xsl:value-of select="position()"/>
447
              </xsl:if>
448
            </xsl:for-each>
449
           </xsl:variable>
450
           <xsl:if test="position() = $entityindex">
451
            <xsl:choose>
452
               <xsl:when test="$displaymodule='attributedetail'">
453
                 <xsl:for-each select="attributeList">
454
                   <xsl:call-template name="singleattribute">
455
                    <xsl:with-param name="attributeindex" select="$attributeindex"/>
456
                    <xsl:with-param name="docid" select="$docid"/>
457
                    <xsl:with-param name="entitytype" select="'otherEntity'"/>
458
                    <xsl:with-param name="entityindex" select="$otherEntityCount"/>
459
                   </xsl:call-template>
460
                 </xsl:for-each>
461
               </xsl:when>
462
               <xsl:otherwise>
463
                 <xsl:for-each select="../.">
464
                   <xsl:call-template name="chooseentity">
465
                    <xsl:with-param name="entitytype" select="'otherEntity'"/>
466
                    <xsl:with-param name="entityindex" select="$otherEntityCount"/>
467
                   </xsl:call-template>
468
                  </xsl:for-each>
469
                  </xsl:otherwise>
470
                 </xsl:choose>
471
             </xsl:if>
472
          </xsl:if>
473
        </xsl:for-each>
474
      </xsl:when>
475
      <xsl:otherwise>
476
  <xsl:choose>
477
     <xsl:when test="$displaymodule='attributedetail'">
478
      <xsl:for-each select="attributeList">
479
       <xsl:call-template name="singleattribute">
480
         <xsl:with-param name="attributeindex" select="$attributeindex"/>
481
         <xsl:with-param name="docid" select="$docid"/>
482
         <xsl:with-param name="entitytype" select="$entitytype"/>
483
         <xsl:with-param name="entityindex" select="$entityindex"/>
484
       </xsl:call-template>
485
      </xsl:for-each>
486
     </xsl:when>
487
     <xsl:otherwise>
488
       <xsl:call-template name="chooseentity">
489
         <xsl:with-param name="entitytype" select="$entitytype"/>
490
         <xsl:with-param name="entityindex" select="$entityindex"/>
491
       </xsl:call-template>
492
     </xsl:otherwise>
493
    </xsl:choose>
494
       </xsl:otherwise>
495
     </xsl:choose>
496
   </xsl:template>
497

    
498

    
499
   <xsl:template name="chooseentity" match='dataset'>
500
      <xsl:param name="entityindex"/>
501
      <xsl:param name="entitytype"/>
502
     <xsl:if test="$entitytype='dataTable'">
503
        <xsl:for-each select="dataTable">
504
            <xsl:if test="position()=$entityindex">
505
                   <xsl:choose>
506
                     <xsl:when test="references!=''">
507
                        <xsl:variable name="ref_id" select="references"/>
508
                        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
509
                          <xsl:for-each select="$references">
510
                              <xsl:choose>
511
                                 <xsl:when test="$displaymodule='entity' or $displaymodule='printall'">
512
                                    <xsl:call-template name="dataTable">
513
                                        <xsl:with-param name="datatablefirstColStyle" select="$firstColStyle"/>
514
                                        <xsl:with-param name="datatablesubHeaderStyle" select="$subHeaderStyle"/>
515
                                        <xsl:with-param name="docid" select="$docid"/>
516
                                        <xsl:with-param name="entitytype" select="$entitytype"/>
517
                                        <xsl:with-param name="entityindex" select="$entityindex"/>
518
                                    </xsl:call-template>
519
                                 </xsl:when>
520
                                 <xsl:otherwise>
521
                                    <xsl:call-template name="chooseattributelist"/>
522
                                 </xsl:otherwise>
523
                              </xsl:choose>
524
                          </xsl:for-each>
525
                     </xsl:when>
526
                     <xsl:otherwise>
527
                       <xsl:choose>
528
                                 <xsl:when test="$displaymodule='entity' or $displaymodule='printall'">
529
                                    <xsl:call-template name="dataTable">
530
                                        <xsl:with-param name="datatablefirstColStyle" select="$firstColStyle"/>
531
                                        <xsl:with-param name="datatablesubHeaderStyle" select="$subHeaderStyle"/>
532
                                        <xsl:with-param name="docid" select="$docid"/>
533
                                        <xsl:with-param name="entitytype" select="$entitytype"/>
534
                                        <xsl:with-param name="entityindex" select="$entityindex"/>
535
                                    </xsl:call-template>
536
                                 </xsl:when>
537
                                 <xsl:otherwise>
538
                                    <xsl:call-template name="chooseattributelist"/>
539
                                 </xsl:otherwise>
540
                       </xsl:choose>
541
                   </xsl:otherwise>
542
                </xsl:choose>
543
            </xsl:if>
544
        </xsl:for-each>
545
      </xsl:if>
546
      <xsl:if test="$entitytype='spatialRaster'">
547
        <xsl:for-each select="spatialRaster">
548
            <xsl:if test="position()=$entityindex">
549
                   <xsl:choose>
550
                     <xsl:when test="references!=''">
551
                        <xsl:variable name="ref_id" select="references"/>
552
                        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
553
                          <xsl:for-each select="$references">
554
                              <xsl:choose>
555
                                 <xsl:when test="$displaymodule='entity' or $displaymodule='printall'">
556
                                    <xsl:call-template name="spatialRaster">
557
                                        <xsl:with-param name="spatialrasterfirstColStyle" select="$firstColStyle"/>
558
                                        <xsl:with-param name="spatialrastersubHeaderStyle" select="$subHeaderStyle"/>
559
                                        <xsl:with-param name="docid" select="$docid"/>
560
                                        <xsl:with-param name="entitytype" select="$entitytype"/>
561
                                        <xsl:with-param name="entityindex" select="$entityindex"/>
562
                                    </xsl:call-template>
563
                                 </xsl:when>
564
                                 <xsl:otherwise>
565
                                    <xsl:call-template name="chooseattributelist"/>
566
                                 </xsl:otherwise>
567
                              </xsl:choose>
568
                          </xsl:for-each>
569
                     </xsl:when>
570
                     <xsl:otherwise>
571
                       <xsl:choose>
572
                                 <xsl:when test="$displaymodule='entity' or $displaymodule='printall'">
573
                                    <xsl:call-template name="spatialRaster">
574
                                        <xsl:with-param name="spatialrasterfirstColStyle" select="$firstColStyle"/>
575
                                        <xsl:with-param name="spatialrastersubHeaderStyle" select="$subHeaderStyle"/>
576
                                        <xsl:with-param name="docid" select="$docid"/>
577
                                        <xsl:with-param name="entitytype" select="$entitytype"/>
578
                                        <xsl:with-param name="entityindex" select="$entityindex"/>
579
                                    </xsl:call-template>
580
                                 </xsl:when>
581
                                 <xsl:otherwise>
582
                                    <xsl:call-template name="chooseattributelist"/>
583
                                 </xsl:otherwise>
584
                       </xsl:choose>
585
                   </xsl:otherwise>
586
                </xsl:choose>
587
            </xsl:if>
588
        </xsl:for-each>
589
      </xsl:if>
590
      <xsl:if test="$entitytype='spatialVector'">
591
        <xsl:for-each select="spatialVector">
592
            <xsl:if test="position()=$entityindex">
593
                   <xsl:choose>
594
                     <xsl:when test="references!=''">
595
                        <xsl:variable name="ref_id" select="references"/>
596
                        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
597
                          <xsl:for-each select="$references">
598
                              <xsl:choose>
599
                                 <xsl:when test="$displaymodule='entity' or $displaymodule='printall'">
600
                                    <xsl:call-template name="spatialVector">
601
                                       <xsl:with-param name="spatialvectorfirstColStyle" select="$firstColStyle"/>
602
                                        <xsl:with-param name="spatialvectorsubHeaderStyle" select="$subHeaderStyle"/>
603
                                        <xsl:with-param name="docid" select="$docid"/>
604
                                        <xsl:with-param name="entitytype" select="$entitytype"/>
605
                                        <xsl:with-param name="entityindex" select="$entityindex"/>
606
                                    </xsl:call-template>
607
                                 </xsl:when>
608
                                 <xsl:otherwise>
609
                                    <xsl:call-template name="chooseattributelist"/>
610
                                 </xsl:otherwise>
611
                              </xsl:choose>
612
                          </xsl:for-each>
613
                     </xsl:when>
614
                     <xsl:otherwise>
615
                       <xsl:choose>
616
                                 <xsl:when test="$displaymodule='entity' or $displaymodule='printall'">
617
                                    <xsl:call-template name="spatialVector">
618
                                        <xsl:with-param name="spatialvectorfirstColStyle" select="$firstColStyle"/>
619
                                        <xsl:with-param name="spatialvectorsubHeaderStyle" select="$subHeaderStyle"/>
620
                                        <xsl:with-param name="docid" select="$docid"/>
621
                                        <xsl:with-param name="entitytype" select="$entitytype"/>
622
                                        <xsl:with-param name="entityindex" select="$entityindex"/>
623
                                    </xsl:call-template>
624
                                 </xsl:when>
625
                                 <xsl:otherwise>
626
                                    <xsl:call-template name="chooseattributelist"/>
627
                                 </xsl:otherwise>
628
                       </xsl:choose>
629
                   </xsl:otherwise>
630
                </xsl:choose>
631
            </xsl:if>
632
        </xsl:for-each>
633
      </xsl:if>
634
      <xsl:if test="$entitytype='storedProcedure'">
635
        <xsl:for-each select="storedProcedure">
636
            <xsl:if test="position()=$entityindex">
637
                   <xsl:choose>
638
                     <xsl:when test="references!=''">
639
                        <xsl:variable name="ref_id" select="references"/>
640
                        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
641
                          <xsl:for-each select="$references">
642
                              <xsl:choose>
643
                                 <xsl:when test="$displaymodule='entity' or $displaymodule='printall'">
644
                                    <xsl:call-template name="storedProcedure">
645
                                       <xsl:with-param name="storedprocedurefirstColStyle" select="$firstColStyle"/>
646
                                       <xsl:with-param name="storedproceduresubHeaderStyle" select="$subHeaderStyle"/>
647
                                       <xsl:with-param name="docid" select="$docid"/>
648
                                       <xsl:with-param name="entitytype" select="$entitytype"/>
649
                                       <xsl:with-param name="entityindex" select="$entityindex"/>
650
                                    </xsl:call-template>
651
                                 </xsl:when>
652
                                 <xsl:otherwise>
653
                                    <xsl:call-template name="chooseattributelist"/>
654
                                 </xsl:otherwise>
655
                              </xsl:choose>
656
                          </xsl:for-each>
657
                     </xsl:when>
658
                     <xsl:otherwise>
659
                       <xsl:choose>
660
                                 <xsl:when test="$displaymodule='entity' or $displaymodule='printall'">
661
                                    <xsl:call-template name="storedProcedure">
662
                                       <xsl:with-param name="storedprocedurefirstColStyle" select="$firstColStyle"/>
663
                                       <xsl:with-param name="storedproceduresubHeaderStyle" select="$subHeaderStyle"/>
664
                                       <xsl:with-param name="docid" select="$docid"/>
665
                                       <xsl:with-param name="entitytype" select="$entitytype"/>
666
                                       <xsl:with-param name="entityindex" select="$entityindex"/>
667
                                    </xsl:call-template>
668
                                 </xsl:when>
669
                                 <xsl:otherwise>
670
                                    <xsl:call-template name="chooseattributelist"/>
671
                                 </xsl:otherwise>
672
                       </xsl:choose>
673
                   </xsl:otherwise>
674
                </xsl:choose>
675
            </xsl:if>
676
        </xsl:for-each>
677
      </xsl:if>
678
      <xsl:if test="$entitytype='view'">
679
        <xsl:for-each select="view">
680
            <xsl:if test="position()=$entityindex">
681
                   <xsl:choose>
682
                     <xsl:when test="references!=''">
683
                        <xsl:variable name="ref_id" select="references"/>
684
                        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
685
                          <xsl:for-each select="$references">
686
                              <xsl:choose>
687
                                 <xsl:when test="$displaymodule='entity' or $displaymodule='printall'">
688
                                    <xsl:call-template name="view">
689
                                       <xsl:with-param name="viewfirstColStyle" select="$firstColStyle"/>
690
                                       <xsl:with-param name="viewsubHeaderStyle" select="$subHeaderStyle"/>
691
                                       <xsl:with-param name="docid" select="$docid"/>
692
                                       <xsl:with-param name="entitytype" select="$entitytype"/>
693
                                       <xsl:with-param name="entityindex" select="$entityindex"/>
694
                                    </xsl:call-template>
695
                                 </xsl:when>
696
                                 <xsl:otherwise>
697
                                    <xsl:call-template name="chooseattributelist"/>
698
                                 </xsl:otherwise>
699
                              </xsl:choose>
700
                          </xsl:for-each>
701
                     </xsl:when>
702
                     <xsl:otherwise>
703
                       <xsl:choose>
704
                                 <xsl:when test="$displaymodule='entity' or $displaymodule='printall'">
705
                                    <xsl:call-template name="view">
706
                                       <xsl:with-param name="viewfirstColStyle" select="$firstColStyle"/>
707
                                       <xsl:with-param name="viewsubHeaderStyle" select="$subHeaderStyle"/>
708
                                       <xsl:with-param name="docid" select="$docid"/>
709
                                       <xsl:with-param name="entitytype" select="$entitytype"/>
710
                                       <xsl:with-param name="entityindex" select="$entityindex"/>
711
                                    </xsl:call-template>
712
                                 </xsl:when>
713
                                 <xsl:otherwise>
714
                                    <xsl:call-template name="chooseattributelist"/>
715
                                 </xsl:otherwise>
716
                       </xsl:choose>
717
                   </xsl:otherwise>
718
                </xsl:choose>
719
            </xsl:if>
720
        </xsl:for-each>
721
      </xsl:if>
722
      <xsl:if test="$entitytype='otherEntity'">
723
        <xsl:for-each select="otherEntity">
724
            <xsl:if test="position()=$entityindex">
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
                              <xsl:choose>
731
                                 <xsl:when test="$displaymodule='entity' or $displaymodule='printall'">
732
                                    <xsl:call-template name="otherEntity">
733
                                       <xsl:with-param name="otherentityfirstColStyle" select="$firstColStyle"/>
734
                                       <xsl:with-param name="otherentitysubHeaderStyle" select="$subHeaderStyle"/>
735
                                       <xsl:with-param name="docid" select="$docid"/>
736
                                       <xsl:with-param name="entitytype" select="$entitytype"/>
737
                                       <xsl:with-param name="entityindex" select="$entityindex"/>
738
                                    </xsl:call-template>
739
                                 </xsl:when>
740
                                 <xsl:otherwise>
741
                                    <xsl:call-template name="chooseattributelist"/>
742
                                 </xsl:otherwise>
743
                              </xsl:choose>
744
                          </xsl:for-each>
745
                     </xsl:when>
746
                     <xsl:otherwise>
747
                       <xsl:choose>
748
                                 <xsl:when test="$displaymodule='entity' or $displaymodule='printall'">
749
                                    <xsl:call-template name="otherEntity">
750
                                       <xsl:with-param name="otherentityfirstColStyle" select="$firstColStyle"/>
751
                                       <xsl:with-param name="otherentitysubHeaderStyle" select="$subHeaderStyle"/>
752
                                       <xsl:with-param name="docid" select="$docid"/>
753
                                       <xsl:with-param name="entitytype" select="$entitytype"/>
754
                                       <xsl:with-param name="entityindex" select="$entityindex"/>
755
                                    </xsl:call-template>
756
                                 </xsl:when>
757
                                 <xsl:otherwise>
758
                                    <xsl:call-template name="chooseattributelist"/>
759
                                 </xsl:otherwise>
760
                       </xsl:choose>
761
                   </xsl:otherwise>
762
                </xsl:choose>
763
            </xsl:if>
764
        </xsl:for-each>
765
      </xsl:if>
766
   </xsl:template>
767

    
768
   <xsl:template name="chooseattributelist">
769
       <xsl:for-each select="attributeList">
770
    <xsl:choose>
771
         <xsl:when test="references!=''">
772
            <xsl:variable name="ref_id" select="references"/>
773
            <xsl:variable name="references" select="$ids[@id=$ref_id]" />
774
            <xsl:for-each select="$references">
775
               <xsl:call-template name="chooseattribute"/>
776
           </xsl:for-each>
777
         </xsl:when>
778
         <xsl:otherwise>
779
             <xsl:call-template name="chooseattribute"/>
780
        </xsl:otherwise>
781
   </xsl:choose>
782
      </xsl:for-each>
783
   </xsl:template>
784

    
785
   <xsl:template name="chooseattribute">
786
       <xsl:for-each select="attribute">
787
    <xsl:if test="position()=$attributeindex">
788
      <xsl:if test="$displaymodule='attributedomain'">
789
        <xsl:for-each select="measurementScale/*/*">
790
          <xsl:call-template name="nonNumericDomain">
791
              <xsl:with-param name="nondomainfirstColStyle" select="$firstColStyle"/>
792
           </xsl:call-template>
793
        </xsl:for-each>
794
     </xsl:if>
795
     <xsl:if test="$displaymodule='attributecoverage'">
796
        <xsl:for-each select="coverage">
797
          <xsl:call-template name="coverage">
798
          </xsl:call-template>
799
        </xsl:for-each>
800
     </xsl:if>
801
     <xsl:if test="$displaymodule='attributemethod'">
802
        <xsl:for-each select="method">
803
          <xsl:call-template name="method">
804
              <xsl:with-param name="methodfirstColStyle" select="$firstColStyle"/>
805
              <xsl:with-param name="methodsubHeaderStyle" select="$firstColStyle"/>
806
           </xsl:call-template>
807
        </xsl:for-each>
808
     </xsl:if>
809
   </xsl:if>
810
       </xsl:for-each>
811
   </xsl:template>
812

    
813

    
814

    
815
   <!--*************************Distribution Inline Data display module*****************-->
816
   <xsl:template name="emlinlinedata">
817
      <tr><td>
818
      <h3>Inline Data</h3>
819
      </td></tr>
820
      <tr>
821
     <td>
822
      <xsl:if test="$distributionlevel='toplevel'">
823
         <xsl:for-each select="distribution">
824
            <xsl:if test="position()=$distributionindex">
825
               <xsl:choose>
826
                 <xsl:when test="references!=''">
827
                    <xsl:variable name="ref_id1" select="references"/>
828
                    <xsl:variable name="references1" select="$ids[@id=$ref_id1]" />
829
                    <xsl:for-each select="$references1">
830
                        <xsl:for-each select="inline">
831
                            <xsl:value-of select="."/>
832
                        </xsl:for-each>
833
                    </xsl:for-each>
834
                 </xsl:when>
835
                 <xsl:otherwise>
836
                     <xsl:for-each select="inline">
837
                            <xsl:value-of select="."/>
838
                     </xsl:for-each>
839
                 </xsl:otherwise>
840
               </xsl:choose>
841
            </xsl:if>
842
         </xsl:for-each>
843
      </xsl:if>
844
      <xsl:if test="$distributionlevel='entitylevel'">
845
        <xsl:if test="$entitytype='dataTable'">
846
          <xsl:for-each select="dataTable">
847
            <xsl:if test="position()=$entityindex">
848
                <xsl:choose>
849
                 <xsl:when test="references!=''">
850
                    <xsl:variable name="ref_id2" select="references"/>
851
                    <xsl:variable name="references2" select="$ids[@id=$ref_id2]" />
852
                    <xsl:for-each select="$references2">
853
                       <xsl:call-template name="choosephysical"/>
854
                    </xsl:for-each>
855
                 </xsl:when>
856
                 <xsl:otherwise>
857
                     <xsl:call-template name="choosephysical"/>
858
                 </xsl:otherwise>
859
               </xsl:choose>
860
            </xsl:if>
861
          </xsl:for-each>
862
        </xsl:if>
863
        <xsl:if test="$entitytype='spatialRaster'">
864
          <xsl:for-each select="spatialRaster">
865
            <xsl:if test="position()=$entityindex">
866
                <xsl:choose>
867
                 <xsl:when test="references!=''">
868
                    <xsl:variable name="ref_id2" select="references"/>
869
                    <xsl:variable name="references2" select="$ids[@id=$ref_id2]" />
870
                    <xsl:for-each select="$references2">
871
                       <xsl:call-template name="choosephysical"/>
872
                    </xsl:for-each>
873
                 </xsl:when>
874
                 <xsl:otherwise>
875
                     <xsl:call-template name="choosephysical"/>
876
                 </xsl:otherwise>
877
               </xsl:choose>
878
            </xsl:if>
879
          </xsl:for-each>
880
        </xsl:if>
881
        <xsl:if test="$entitytype='spatialVector'">
882
          <xsl:for-each select="spatialVector">
883
            <xsl:if test="position()=$entityindex">
884
                <xsl:choose>
885
                 <xsl:when test="references!=''">
886
                    <xsl:variable name="ref_id2" select="references"/>
887
                    <xsl:variable name="references2" select="$ids[@id=$ref_id2]" />
888
                    <xsl:for-each select="$references2">
889
                       <xsl:call-template name="choosephysical"/>
890
                    </xsl:for-each>
891
                 </xsl:when>
892
                 <xsl:otherwise>
893
                     <xsl:call-template name="choosephysical"/>
894
                 </xsl:otherwise>
895
               </xsl:choose>
896
            </xsl:if>
897
          </xsl:for-each>
898
        </xsl:if>
899
        <xsl:if test="$entitytype='storedProcedure'">
900
          <xsl:for-each select="storedProcedure">
901
            <xsl:if test="position()=$entityindex">
902
                <xsl:choose>
903
                 <xsl:when test="references!=''">
904
                    <xsl:variable name="ref_id2" select="references"/>
905
                    <xsl:variable name="references2" select="$ids[@id=$ref_id2]" />
906
                    <xsl:for-each select="$references2">
907
                       <xsl:call-template name="choosephysical"/>
908
                    </xsl:for-each>
909
                 </xsl:when>
910
                 <xsl:otherwise>
911
                     <xsl:call-template name="choosephysical"/>
912
                 </xsl:otherwise>
913
               </xsl:choose>
914
            </xsl:if>
915
          </xsl:for-each>
916
        </xsl:if>
917
        <xsl:if test="$entitytype='view'">
918
          <xsl:for-each select="view">
919
            <xsl:if test="position()=$entityindex">
920
                <xsl:choose>
921
                 <xsl:when test="references!=''">
922
                    <xsl:variable name="ref_id2" select="references"/>
923
                    <xsl:variable name="references2" select="$ids[@id=$ref_id2]" />
924
                    <xsl:for-each select="$references2">
925
                       <xsl:call-template name="choosephysical"/>
926
                    </xsl:for-each>
927
                 </xsl:when>
928
                 <xsl:otherwise>
929
                     <xsl:call-template name="choosephysical"/>
930
                 </xsl:otherwise>
931
               </xsl:choose>
932
            </xsl:if>
933
          </xsl:for-each>
934
        </xsl:if>
935
        <xsl:if test="$entitytype='otherEntity'">
936
          <xsl:for-each select="otherEntity">
937
            <xsl:if test="position()=$entityindex">
938
                <xsl:choose>
939
                 <xsl:when test="references!=''">
940
                    <xsl:variable name="ref_id2" select="references"/>
941
                    <xsl:variable name="references2" select="$ids[@id=$ref_id2]" />
942
                    <xsl:for-each select="$references2">
943
                       <xsl:call-template name="choosephysical"/>
944
                    </xsl:for-each>
945
                 </xsl:when>
946
                 <xsl:otherwise>
947
                     <xsl:call-template name="choosephysical"/>
948
                 </xsl:otherwise>
949
               </xsl:choose>
950
            </xsl:if>
951
          </xsl:for-each>
952
        </xsl:if>
953
      </xsl:if>
954
    </td>
955
      </tr>
956
   </xsl:template>
957

    
958
   <xsl:template name="choosephysical">
959
      <xsl:for-each select="physical">
960
   <xsl:if test="position()=$physicalindex">
961
      <xsl:choose>
962
         <xsl:when test="references!=''">
963
            <xsl:variable name="ref_id" select="references"/>
964
            <xsl:variable name="references" select="$ids[@id=$ref_id]" />
965
            <xsl:for-each select="$references">
966
               <xsl:call-template name="choosedistribution"/>
967
            </xsl:for-each>
968
         </xsl:when>
969
         <xsl:otherwise>
970
            <xsl:call-template name="choosedistribution"/>
971
        </xsl:otherwise>
972
     </xsl:choose>
973
  </xsl:if>
974
      </xsl:for-each>
975
   </xsl:template>
976

    
977
   <xsl:template name="choosedistribution">
978
      <xsl:for-each select="distribution">
979
   <xsl:if test="$distributionindex=position()">
980
      <xsl:choose>
981
         <xsl:when test="references!=''">
982
            <xsl:variable name="ref_id" select="references"/>
983
            <xsl:variable name="references" select="$ids[@id=$ref_id]" />
984
            <xsl:for-each select="$references">
985
               <xsl:for-each select="inline">
986
                  <xsl:value-of select="."/>
987
                </xsl:for-each>
988
            </xsl:for-each>
989
         </xsl:when>
990
         <xsl:otherwise>
991
            <xsl:for-each select="inline">
992
              <xsl:value-of select="."/>
993
            </xsl:for-each>
994
        </xsl:otherwise>
995
     </xsl:choose>
996
  </xsl:if>
997
      </xsl:for-each>
998
   </xsl:template>
999

    
1000

    
1001
     <!--********************************************************
1002
               Citation part
1003
       ********************************************************-->
1004
   <xsl:template name="emlcitation">
1005
     <xsl:choose>
1006
       <xsl:when test="$displaymodule='inlinedata'">
1007
    <xsl:call-template name="emlinlinedata"/>
1008
       </xsl:when>
1009
       <xsl:otherwise>
1010
  <table xsl:use-attribute-sets="cellspacing" class="{$tabledefaultStyle}">
1011
  <tr>
1012
    <td colspan="2">
1013
         <h3>Citation Description</h3>
1014
    </td>
1015
  </tr>
1016
  <xsl:call-template name="identifier">
1017
        <xsl:with-param name="packageID" select="../@packageId"/>
1018
        <xsl:with-param name="system" select="../@system"/>
1019
  </xsl:call-template>
1020
  <tr>
1021
    <td colspan="2">
1022
      <xsl:call-template name="citation">
1023
         <xsl:with-param name="citationfirstColStyle" select="$firstColStyle"/>
1024
         <xsl:with-param name="citationsubHeaderStyle" select="$subHeaderStyle"/>
1025
     </xsl:call-template>
1026
    </td>
1027
  </tr>
1028
      </table>
1029
     </xsl:otherwise>
1030
    </xsl:choose>
1031
   </xsl:template>
1032

    
1033

    
1034

    
1035
     <!--********************************************************
1036
              Software part
1037
       ********************************************************-->
1038

    
1039
   <xsl:template name="emlsoftware">
1040
     <xsl:choose>
1041
       <xsl:when test="$displaymodule='inlinedata'">
1042
    <xsl:call-template name="emlinlinedata"/>
1043
       </xsl:when>
1044
       <xsl:otherwise>
1045
    <table xsl:use-attribute-sets="cellspacing" class="{$tabledefaultStyle}">
1046
    <tr>
1047
      <td colspan="2">
1048
         <h3>Software Description</h3>
1049
     </td>
1050
    </tr>
1051
    <xsl:call-template name="identifier">
1052
        <xsl:with-param name="packageID" select="../@packageId"/>
1053
        <xsl:with-param name="system" select="../@system"/>
1054
    </xsl:call-template>
1055
    <tr>
1056
     <td colspan="2">
1057
      <xsl:call-template name="software">
1058
         <xsl:with-param name="softwarefirstColStyle" select="$firstColStyle"/>
1059
         <xsl:with-param name="softwaresubHeaderStyle" select="$subHeaderStyle"/>
1060
     </xsl:call-template>
1061
     </td>
1062
   </tr>
1063
       </table>
1064
      </xsl:otherwise>
1065
     </xsl:choose>
1066
   </xsl:template>
1067

    
1068

    
1069
     <!--********************************************************
1070
              Protocal part
1071
       ********************************************************-->
1072

    
1073
   <xsl:template name="emlprotocol">
1074
    <xsl:choose>
1075
       <xsl:when test="$displaymodule='inlinedata'">
1076
    <xsl:call-template name="emlinlinedata"/>
1077
       </xsl:when>
1078
       <xsl:otherwise>
1079
  <table xsl:use-attribute-sets="cellspacing" class="{$tabledefaultStyle}">
1080
   <tr>
1081
    <td colspan="2">
1082
         <h3>Protocal Description</h3>
1083
    </td>
1084
   </tr>
1085
   <xsl:call-template name="identifier">
1086
        <xsl:with-param name="packageID" select="../@packageId"/>
1087
        <xsl:with-param name="system" select="../@system"/>
1088
   </xsl:call-template>
1089
   <tr>
1090
    <td colspan="2">
1091
      <xsl:call-template name="protocol">
1092
         <xsl:with-param name="protocolfirstColStyle" select="$firstColStyle"/>
1093
         <xsl:with-param name="protocolsubHeaderStyle" select="$subHeaderStyle"/>
1094
     </xsl:call-template>
1095
    </td>
1096
   </tr>
1097
       </table>
1098
      </xsl:otherwise>
1099
    </xsl:choose>
1100
   </xsl:template>
1101

    
1102
      <!--********************************************************
1103
             additionalmetadata url
1104
       ********************************************************-->
1105
   <xsl:template name="additionalmetadataURL">
1106
     <xsl:param name="index"/>
1107
     <table class="{$tabledefaultStyle}">
1108
       <tr>
1109
         <td>
1110
           <a><xsl:attribute name="href"><xsl:value-of select="$tripleURI"/><xsl:value-of select="$docid"/>&amp;displaymodule=additionalmetadata&amp;additionalmetadataindex=<xsl:value-of select="$index"/></xsl:attribute>
1111
             Additional Metadata
1112
           </a>
1113
         </td>
1114
       </tr>
1115
     </table>
1116
   </xsl:template>
1117
	<!--********************************************************
1118
             additionalmetadata part
1119
       ********************************************************-->
1120
   <xsl:template name="additionalmetadatapart">
1121
		<tr>
1122
			<td colspan="2">
1123
				<div class="{$tabledefaultStyle}">
1124
					<xsl:call-template name="additionalmetadata"/>
1125
				</div>					
1126
			</td>
1127
		</tr>
1128
   </xsl:template>
1129
     <!--********************************************************
1130
             download xml part
1131
       ********************************************************-->
1132
	<xsl:template name="xml">
1133
		<xsl:param name="index" />
1134
			<tr>
1135
				<td width="{$firstColWidth}" class="rowodd">Metadata download:</td>
1136
				<td width="{$secondColWidth}" class="roweven">
1137
					<a>
1138
						<xsl:attribute name="href">
1139
           					<xsl:value-of select="$xmlURI" /><xsl:value-of select="$docid" />
1140
           				</xsl:attribute>
1141
						Ecological Metadata Language (EML) File
1142
					</a>
1143
				</td>
1144
			</tr>
1145
	</xsl:template>
1146
	
1147
	<!--********************************************************
1148
                   access part
1149
       ********************************************************-->
1150
	<xsl:template name="topaccess">
1151
		<xsl:if test="$displaymodule='dataset' or $displaymodule='printall'">
1152
			<tr>
1153
				<td colspan="2">
1154
					<xsl:call-template name="access">
1155
						<xsl:with-param name="accessfirstColStyle" select="$firstColStyle"/>
1156
						<xsl:with-param name="accesssubHeaderStyle" select="$subHeaderStyle"/>
1157
					</xsl:call-template>
1158
				</td>
1159
			</tr>
1160
		</xsl:if>
1161
	</xsl:template>
1162
</xsl:stylesheet>