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: leinfelder $'
10
  *     '$Date: 2013-07-16 10:21:39 -0700 (Tue, 16 Jul 2013) $'
11
  * '$Revision: 7997 $'
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
   	<form class="form-horizontal">
65
   	
66
     <xsl:for-each select="dataset">
67
       <xsl:call-template name="emldataset"/>
68
     </xsl:for-each>
69
     <xsl:for-each select="citation">
70
       <xsl:call-template name="emlcitation"/>
71
     </xsl:for-each>
72
     <xsl:for-each select="software">
73
       <xsl:call-template name="emlsoftware"/>
74
     </xsl:for-each>
75
     <xsl:for-each select="protocol">
76
       <xsl:call-template name="emlprotocol"/>
77
     </xsl:for-each>
78
     <xsl:for-each select="access">
79
		<xsl:call-template name="topaccess"/>
80
	 </xsl:for-each>
81
     <!-- Additional metadata-->
82
     <xsl:choose>
83
       <xsl:when test="$displaymodule='additionalmetadata' or $displaymodule='printall'">
84
         <xsl:for-each select="additionalMetadata">
85
           <xsl:if test="$additionalmetadataindex=position()">
86
                 <xsl:call-template name="additionalmetadatapart"/>
87
            </xsl:if>
88
         </xsl:for-each>
89
       </xsl:when>
90
       <xsl:otherwise>
91
         <xsl:if test="$displaymodule='dataset' or $displaymodule='printall'">
92
           <xsl:if test="$withAdditionalMetadataLink='1'">
93
             <xsl:for-each select="additionalMetadata">
94
               <div class="{$tabledefaultStyle}">
95
                 <xsl:call-template name="additionalmetadataURL">
96
                    <xsl:with-param name="index" select="position()"/>
97
                  </xsl:call-template>
98
               </div>
99
             </xsl:for-each>
100
           </xsl:if>
101
         </xsl:if>
102
       </xsl:otherwise>
103
     </xsl:choose>
104
     <!-- xml format-->
105
     <xsl:if test="$displaymodule='dataset'">
106
       <xsl:if test="$withOriginalXMLLink='1'">
107
			<tr>
108
				<td colspan="2">
109
			       	<table class="subGroup subGroup_border onehundred_percent">
110
			         	<xsl:call-template name="xml"/>
111
			         </table>
112
				</td>
113
			</tr>  
114
       </xsl:if>
115
     </xsl:if>
116
     
117
     </form>
118
   </xsl:template>
119

    
120
   <!--********************************************************
121
                       dataset part
122
       ********************************************************-->
123

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

    
156
   <!--*************** Data set diaplay *************-->
157
   <xsl:template name="datasetpart">
158
       <xsl:apply-templates select="." mode="dataset"/>
159
   </xsl:template>
160

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

    
177

    
178
    <xsl:template name="entitypartcommon">
179
      <h4>Data Object Details</h4>
180
      
181
      <xsl:call-template name="identifier">
182
          <xsl:with-param name="packageID" select="../@packageId"/>
183
          <xsl:with-param name="system" select="../@system"/>
184
      </xsl:call-template>
185
      
186
      <div class="row-fluid">
187
		<!-- find the subtree to process -->
188
		<xsl:call-template name="entityparam"/>
189
      </div>
190
   </xsl:template>
191

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

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

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

    
233

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

    
247

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

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

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

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

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

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

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

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

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

    
500

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

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

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

    
815

    
816

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

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

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

    
1002

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

    
1035

    
1036

    
1037
     <!--********************************************************
1038
              Software part
1039
       ********************************************************-->
1040

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

    
1070

    
1071
     <!--********************************************************
1072
              Protocal part
1073
       ********************************************************-->
1074

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

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