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:44:41 -0700 (Tue, 16 Jul 2013) $'
11
  * '$Revision: 7999 $'
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
      <div class="row-fluid">
182
		<!-- find the subtree to process -->
183
		<xsl:call-template name="entityparam"/>
184
      </div>
185
   </xsl:template>
186

    
187
   <!--************ Attribute display *****************-->
188
   <xsl:template name="attributedetailpart">
189
   </xsl:template>
190

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

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

    
228

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

    
242

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

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

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

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

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

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

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

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

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

    
495

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

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

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

    
810

    
811

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

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

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

    
997

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

    
1030

    
1031

    
1032
     <!--********************************************************
1033
              Software part
1034
       ********************************************************-->
1035

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

    
1065

    
1066
     <!--********************************************************
1067
              Protocal part
1068
       ********************************************************-->
1069

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

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