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-15 14:17:45 -0700 (Mon, 15 Jul 2013) $'
11
  * '$Revision: 7987 $'
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
      <tr><th colspan="2">
180
      Data Object Description
181
      </th></tr>
182
      <xsl:call-template name="identifier">
183
          <xsl:with-param name="packageID" select="../@packageId"/>
184
          <xsl:with-param name="system" select="../@system"/>
185
      </xsl:call-template>
186
      <tr>
187
     <td colspan="2">
188
        <!-- find the subtree to process -->
189
       <xsl:call-template name="entityparam"/>
190
     </td>
191
      </tr>
192
   </xsl:template>
193

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

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

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

    
235

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

    
249

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

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

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

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

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

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

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

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

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

    
502

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

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

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

    
817

    
818

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

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

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

    
1004

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

    
1037

    
1038

    
1039
     <!--********************************************************
1040
              Software part
1041
       ********************************************************-->
1042

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

    
1072

    
1073
     <!--********************************************************
1074
              Protocal part
1075
       ********************************************************-->
1076

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

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