Project

General

Profile

1 3094 cjones
<?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$'
10
  *     '$Date$'
11
  * '$Revision$'
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
  <xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/pageheader.xsl"/>
60
  <xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/pagefooter.xsl"/>
61
  <xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/page_leftsidebar.xsl"/>
62
  <xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/page_rightsidebar.xsl"/>
63
  <xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/page_rightsidebar.xsl"/>
64
65
  <xsl:output method="html" encoding="iso-8859-1"
66
    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
67
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
68
    indent="yes" />
69
  <!-- global variables to store id node set in case to be referenced-->
70
  <xsl:variable name="ids" select="//*[@id!='']"/>
71
72
  <xsl:template match="/">
73
    <html>
74
      <head>
75
        <link rel="stylesheet" type="text/css"
76
              href="{$stylePath}/{$qformat}/{$qformat}.css" />
77
      </head>
78
      <body>
79
        <!-- begin the header area -->
80
        <xsl:call-template name="pageheader" />
81
        <!-- end the header area -->
82
83
        <!-- begin the left sidebar area -->
84
        <xsl:call-template name="page_leftsidebar" />
85
        <!-- end the left sidebar area -->
86
87
        <!-- begin the content area -->
88
        <div id="{$mainTableAligmentStyle}">
89
          <xsl:apply-templates select="*[local-name()='eml']"/>
90
        </div>
91
        <!-- end the content area -->
92
93
        <!-- begin the right sidebar area -->
94
        <xsl:call-template name="page_rightsidebar" />
95
        <!-- end the right sidebar area -->
96
97
        <!-- begin the footer area -->
98
        <xsl:call-template name="pagefooter" />
99
        <!-- end the footer area -->
100
      </body>
101
    </html>
102
   </xsl:template>
103
104
   <xsl:template match="*[local-name()='eml']">
105
     <xsl:for-each select="dataset">
106
       <xsl:call-template name="emldataset"/>
107
     </xsl:for-each>
108
     <xsl:for-each select="citation">
109
       <xsl:call-template name="emlcitation"/>
110
     </xsl:for-each>
111
     <xsl:for-each select="software">
112
       <xsl:call-template name="emlsoftware"/>
113
     </xsl:for-each>
114
     <xsl:for-each select="protocol">
115
       <xsl:call-template name="emlprotocol"/>
116
     </xsl:for-each>
117
     <!-- Additional metadata-->
118
     <xsl:choose>
119
       <xsl:when test="$displaymodule='additionalmetadata'">
120
         <xsl:for-each select="additionalMetadata">
121
           <xsl:if test="$additionalmetadataindex=position()">
122
              <div class="{$tabledefaultStyle}">
123
                 <xsl:call-template name="additionalmetadata"/>
124
               </div>
125
            </xsl:if>
126
         </xsl:for-each>
127
       </xsl:when>
128
       <xsl:otherwise>
129
         <xsl:if test="$displaymodule='dataset'">
130
           <xsl:if test="$withAdditionalMetadataLink='1'">
131
             <xsl:for-each select="additionalMetadata">
132
               <div class="{$tabledefaultStyle}">
133
                 <xsl:call-template name="additionalmetadataURL">
134
                    <xsl:with-param name="index" select="position()"/>
135
                  </xsl:call-template>
136
               </div>
137
             </xsl:for-each>
138
           </xsl:if>
139
         </xsl:if>
140
       </xsl:otherwise>
141
     </xsl:choose>
142
     <!-- xml format-->
143
     <xsl:if test="$displaymodule='dataset'">
144
       <xsl:if test="$withOriginalXMLLink='1'">
145
         <xsl:call-template name="xml"/>
146
       </xsl:if>
147
     </xsl:if>
148
   </xsl:template>
149
150
   <!--********************************************************
151
                       dataset part
152
       ********************************************************-->
153
154
   <xsl:template name="emldataset">
155
    <div class="{$mainContainerTableStyle}">
156
    <xsl:if test="$displaymodule='dataset'">
157
       <xsl:call-template name="datasetpart"/>
158
    </xsl:if>
159
    <xsl:if test="$displaymodule='entity'">
160
       <xsl:call-template name="entitypart"/>
161
    </xsl:if>
162
    <xsl:if test="$displaymodule='attribute'">
163
       <xsl:call-template name="attributepart"/>
164
    </xsl:if>
165
    <xsl:if test="$displaymodule='attributedomain'">
166
       <xsl:call-template name="datasetattributedomain"/>
167
    </xsl:if>
168
    <xsl:if test="$displaymodule='attributecoverage'">
169
       <xsl:call-template name="datasetattributecoverage"/>
170
    </xsl:if>
171
    <xsl:if test="$displaymodule='attributemethod'">
172
       <xsl:call-template name="datasetattributemethod"/>
173
    </xsl:if>
174
    <xsl:if test="$displaymodule='inlinedata'">
175
       <xsl:call-template name="emlinlinedata"/>
176
    </xsl:if>
177
    <xsl:if test="$displaymodule='attributedetail'">
178
       <xsl:call-template name="entityparam"/>
179
    </xsl:if>
180
    </div>
181
   </xsl:template>
182
183
   <!--*************** Data set diaplay *************-->
184
   <xsl:template name="datasetpart">
185
       <xsl:apply-templates select="." mode="dataset"/>
186
   </xsl:template>
187
188
   <!--************ Entity diplay *****************-->
189
   <xsl:template name="entitypart">
190
       <xsl:choose>
191
         <xsl:when test="references!=''">
192
            <xsl:variable name="ref_id" select="references"/>
193
            <xsl:variable name="references" select="$ids[@id=$ref_id]" />
194
            <xsl:for-each select="$references">
195
               <xsl:call-template name="entitypartcommon"/>
196
            </xsl:for-each>
197
         </xsl:when>
198
         <xsl:otherwise>
199
            <xsl:call-template name="entitypartcommon"/>
200
        </xsl:otherwise>
201
   </xsl:choose>
202
    </xsl:template>
203
204
205
    <xsl:template name="entitypartcommon">
206
      <tr><th colspan="2">
207
      Entity Description
208
      </th></tr>
209
      <xsl:call-template name="identifier">
210
          <xsl:with-param name="packageID" select="../@packageId"/>
211
          <xsl:with-param name="system" select="../@system"/>
212
      </xsl:call-template>
213
      <tr>
214
     <td colspan="2">
215
        <!-- find the subtree to process -->
216
       <xsl:call-template name="entityparam"/>
217
     </td>
218
      </tr>
219
   </xsl:template>
220
221
   <!--************ Attribute display *****************-->
222
   <xsl:template name="attributedetailpart">
223
   </xsl:template>
224
225
    <xsl:template name="attributepart">
226
      <tr><td>
227
      <h3>Attributes Description</h3>
228
      </td></tr>
229
      <tr>
230
     <td>
231
        <!-- find the subtree to process -->
232
      <xsl:if test="$entitytype='dataTable'">
233
        <xsl:for-each select="dataTable">
234
            <xsl:if test="position()=$entityindex">
235
                <xsl:for-each select="attributeList">
236
                   <xsl:call-template name="attributelist">
237
                      <xsl:with-param name="docid" select="$docid"/>
238
                      <xsl:with-param name="entitytype" select="$entitytype"/>
239
                      <xsl:with-param name="entityindex" select="$entityindex"/>
240
                   </xsl:call-template>
241
                </xsl:for-each>
242
            </xsl:if>
243
        </xsl:for-each>
244
      </xsl:if>
245
    </td>
246
      </tr>
247
   </xsl:template>
248
249
   <!--************************Attribute Domain display module************************-->
250
   <xsl:template name="datasetattributedomain">
251
      <tr><td>
252
      <h3>Attribute Domain</h3>
253
      </td></tr>
254
      <tr>
255
     <td>
256
       <!-- find the subtree to process -->
257
       <xsl:call-template name="entityparam"/>
258
    </td>
259
      </tr>
260
   </xsl:template>
261
262
263
   <!--************************Attribute Method display module************************-->
264
   <xsl:template name="datasetattributemethod">
265
      <tr><td>
266
      <h3>Attribute Method</h3>
267
      </td></tr>
268
      <tr>
269
     <td>
270
       <!-- find the subtree to process -->
271
       <xsl:call-template name="entityparam"/>
272
    </td>
273
      </tr>
274
   </xsl:template>
275
276
277
   <!--************************Attribute Coverage display module************************-->
278
   <xsl:template name="datasetattributecoverage">
279
     <tr><td>
280
      <h3>Attribute Coverage</h3>
281
      </td></tr>
282
      <tr>
283
     <td>
284
       <!-- find the subtree to process -->
285
       <xsl:call-template name="entityparam"/>
286
    </td>
287
      </tr>
288
   </xsl:template>
289
290
291
   <xsl:template name="entityparam">
292
     <xsl:choose>
293
      <xsl:when test="$entitytype=''">
294
        <xsl:variable name="dataTableCount" select="0"/>
295
        <xsl:variable name="spatialRasterCount" select="0"/>
296
        <xsl:variable name="spatialVectorCount" select="0"/>
297
        <xsl:variable name="storedProcedureCount" select="0"/>
298
        <xsl:variable name="viewCount" select="0"/>
299
        <xsl:variable name="otherEntityCount" select="0"/>
300
        <xsl:for-each select="dataTable|spatialRaster|spatialVector|storedProcedure|view|otherEntity">
301
302
        <xsl:if test="'dataTable' = name()">
303
           <xsl:variable name="currentNode" select="."/>
304
           <xsl:variable name="dataTableCount">
305
            <xsl:for-each select="../dataTable">
306
                  <xsl:if test=". = $currentNode">
307
                <xsl:value-of select="position()"/>
308
              </xsl:if>
309
            </xsl:for-each>
310
           </xsl:variable>
311
           <xsl:if test="position() = $entityindex">
312
             <xsl:choose>
313
               <xsl:when test="$displaymodule='attributedetail'">
314
                 <xsl:for-each select="attributeList">
315
                   <xsl:call-template name="singleattribute">
316
                    <xsl:with-param name="attributeindex" select="$attributeindex"/>
317
                    <xsl:with-param name="docid" select="$docid"/>
318
                    <xsl:with-param name="entitytype" select="'dataTable'"/>
319
                    <xsl:with-param name="entityindex" select="$dataTableCount"/>
320
                   </xsl:call-template>
321
                 </xsl:for-each>
322
               </xsl:when>
323
               <xsl:otherwise>
324
                 <xsl:for-each select="../.">
325
                   <xsl:call-template name="chooseentity">
326
                    <xsl:with-param name="entitytype" select="'dataTable'"/>
327
                    <xsl:with-param name="entityindex" select="$dataTableCount"/>
328
                   </xsl:call-template>
329
                  </xsl:for-each>
330
                  </xsl:otherwise>
331
                 </xsl:choose>
332
           </xsl:if>
333
        </xsl:if>
334
335
        <xsl:if test="'spatialRaster' = name()">
336
          <xsl:variable name="currentNode" select="."/>
337
           <xsl:variable name="spatialRasterCount">
338
            <xsl:for-each select="../spatialRaster">
339
                  <xsl:if test=". = $currentNode">
340
                <xsl:value-of select="position()"/>
341
              </xsl:if>
342
            </xsl:for-each>
343
           </xsl:variable>
344
            <xsl:if test="position() = $entityindex">
345
           <xsl:choose>
346
               <xsl:when test="$displaymodule='attributedetail'">
347
                 <xsl:for-each select="attributeList">
348
                   <xsl:call-template name="singleattribute">
349
                    <xsl:with-param name="attributeindex" select="$attributeindex"/>
350
                    <xsl:with-param name="docid" select="$docid"/>
351
                    <xsl:with-param name="entitytype" select="'spatialRaster'"/>
352
                    <xsl:with-param name="entityindex" select="$spatialRasterCount"/>
353
                   </xsl:call-template>
354
                 </xsl:for-each>
355
               </xsl:when>
356
               <xsl:otherwise>
357
                 <xsl:for-each select="../.">
358
                   <xsl:call-template name="chooseentity">
359
                    <xsl:with-param name="entitytype" select="'spatialRaster'"/>
360
                    <xsl:with-param name="entityindex" select="$spatialRasterCount"/>
361
                   </xsl:call-template>
362
                  </xsl:for-each>
363
                  </xsl:otherwise>
364
                 </xsl:choose>
365
            </xsl:if>
366
        </xsl:if>
367
368
        <xsl:if test="'spatialVector' = name()">
369
          <xsl:variable name="currentNode" select="."/>
370
           <xsl:variable name="spatialVectorCount">
371
            <xsl:for-each select="../spatialVector">
372
                  <xsl:if test=". = $currentNode">
373
                <xsl:value-of select="position()"/>
374
              </xsl:if>
375
            </xsl:for-each>
376
           </xsl:variable>
377
           <xsl:if test="position() = $entityindex">
378
             <xsl:choose>
379
               <xsl:when test="$displaymodule='attributedetail'">
380
                 <xsl:for-each select="attributeList">
381
                   <xsl:call-template name="singleattribute">
382
                    <xsl:with-param name="attributeindex" select="$attributeindex"/>
383
                    <xsl:with-param name="docid" select="$docid"/>
384
                    <xsl:with-param name="entitytype" select="'spatialVector'"/>
385
                    <xsl:with-param name="entityindex" select="$spatialVectorCount"/>
386
                   </xsl:call-template>
387
                 </xsl:for-each>
388
               </xsl:when>
389
               <xsl:otherwise>
390
                 <xsl:for-each select="../.">
391
                   <xsl:call-template name="chooseentity">
392
                    <xsl:with-param name="entitytype" select="'spatialVector'"/>
393
                    <xsl:with-param name="entityindex" select="$spatialVectorCount"/>
394
                   </xsl:call-template>
395
                  </xsl:for-each>
396
                  </xsl:otherwise>
397
                 </xsl:choose>
398
           </xsl:if>
399
        </xsl:if>
400
401
        <xsl:if test="'storedProcedure' = name()">
402
          <xsl:variable name="currentNode" select="."/>
403
           <xsl:variable name="storedProcedureCount">
404
            <xsl:for-each select="../storedProcedure">
405
                  <xsl:if test=". = $currentNode">
406
                <xsl:value-of select="position()"/>
407
              </xsl:if>
408
            </xsl:for-each>
409
           </xsl:variable>
410
           <xsl:if test="position() = $entityindex">
411
             <xsl:choose>
412
               <xsl:when test="$displaymodule='attributedetail'">
413
                 <xsl:for-each select="attributeList">
414
                   <xsl:call-template name="singleattribute">
415
                    <xsl:with-param name="attributeindex" select="$attributeindex"/>
416
                    <xsl:with-param name="docid" select="$docid"/>
417
                    <xsl:with-param name="entitytype" select="'storedProcedure'"/>
418
                    <xsl:with-param name="entityindex" select="$storedProcedureCount"/>
419
                   </xsl:call-template>
420
                 </xsl:for-each>
421
               </xsl:when>
422
               <xsl:otherwise>
423
                 <xsl:for-each select="../.">
424
                   <xsl:call-template name="chooseentity">
425
                    <xsl:with-param name="entitytype" select="'storedProcedure'"/>
426
                    <xsl:with-param name="entityindex" select="$storedProcedureCount"/>
427
                   </xsl:call-template>
428
                  </xsl:for-each>
429
                  </xsl:otherwise>
430
              </xsl:choose>
431
           </xsl:if>
432
        </xsl:if>
433
434
        <xsl:if test="'view' = name()">
435
          <xsl:variable name="currentNode" select="."/>
436
           <xsl:variable name="viewCount">
437
            <xsl:for-each select="../view">
438
                  <xsl:if test=". = $currentNode">
439
                <xsl:value-of select="position()"/>
440
              </xsl:if>
441
            </xsl:for-each>
442
           </xsl:variable>
443
           <xsl:if test="position() = $entityindex">
444
            <xsl:choose>
445
               <xsl:when test="$displaymodule='attributedetail'">
446
                 <xsl:for-each select="attributeList">
447
                   <xsl:call-template name="singleattribute">
448
                    <xsl:with-param name="attributeindex" select="$attributeindex"/>
449
                    <xsl:with-param name="docid" select="$docid"/>
450
                    <xsl:with-param name="entitytype" select="'view'"/>
451
                    <xsl:with-param name="entityindex" select="$viewCount"/>
452
                   </xsl:call-template>
453
                 </xsl:for-each>
454
               </xsl:when>
455
               <xsl:otherwise>
456
                 <xsl:for-each select="../.">
457
                   <xsl:call-template name="chooseentity">
458
                    <xsl:with-param name="entitytype" select="'view'"/>
459
                    <xsl:with-param name="entityindex" select="$viewCount"/>
460
                   </xsl:call-template>
461
                  </xsl:for-each>
462
                  </xsl:otherwise>
463
                 </xsl:choose>
464
            </xsl:if>
465
        </xsl:if>
466
467
        <xsl:if test="'otherEntityTable' = name()">
468
          <xsl:variable name="currentNode" select="."/>
469
           <xsl:variable name="otherEntityCount">
470
            <xsl:for-each select="../otherEntity">
471
                  <xsl:if test=". = $currentNode">
472
                <xsl:value-of select="position()"/>
473
              </xsl:if>
474
            </xsl:for-each>
475
           </xsl:variable>
476
           <xsl:if test="position() = $entityindex">
477
            <xsl:choose>
478
               <xsl:when test="$displaymodule='attributedetail'">
479
                 <xsl:for-each select="attributeList">
480
                   <xsl:call-template name="singleattribute">
481
                    <xsl:with-param name="attributeindex" select="$attributeindex"/>
482
                    <xsl:with-param name="docid" select="$docid"/>
483
                    <xsl:with-param name="entitytype" select="'otherEntity'"/>
484
                    <xsl:with-param name="entityindex" select="$otherEntityCount"/>
485
                   </xsl:call-template>
486
                 </xsl:for-each>
487
               </xsl:when>
488
               <xsl:otherwise>
489
                 <xsl:for-each select="../.">
490
                   <xsl:call-template name="chooseentity">
491
                    <xsl:with-param name="entitytype" select="'otherEntity'"/>
492
                    <xsl:with-param name="entityindex" select="$otherEntityCount"/>
493
                   </xsl:call-template>
494
                  </xsl:for-each>
495
                  </xsl:otherwise>
496
                 </xsl:choose>
497
             </xsl:if>
498
          </xsl:if>
499
        </xsl:for-each>
500
      </xsl:when>
501
      <xsl:otherwise>
502
  <xsl:choose>
503
     <xsl:when test="$displaymodule='attributedetail'">
504
      <xsl:for-each select="attributeList">
505
       <xsl:call-template name="singleattribute">
506
         <xsl:with-param name="attributeindex" select="$attributeindex"/>
507
         <xsl:with-param name="docid" select="$docid"/>
508
         <xsl:with-param name="entitytype" select="$entitytype"/>
509
         <xsl:with-param name="entityindex" select="$entityindex"/>
510
       </xsl:call-template>
511
      </xsl:for-each>
512
     </xsl:when>
513
     <xsl:otherwise>
514
       <xsl:call-template name="chooseentity">
515
         <xsl:with-param name="entitytype" select="$entitytype"/>
516
         <xsl:with-param name="entityindex" select="$entityindex"/>
517
       </xsl:call-template>
518
     </xsl:otherwise>
519
    </xsl:choose>
520
       </xsl:otherwise>
521
     </xsl:choose>
522
   </xsl:template>
523
524
525
   <xsl:template name="chooseentity" match='dataset'>
526
      <xsl:param name="entityindex"/>
527
      <xsl:param name="entitytype"/>
528
     <xsl:if test="$entitytype='dataTable'">
529
        <xsl:for-each select="dataTable">
530
            <xsl:if test="position()=$entityindex">
531
                   <xsl:choose>
532
                     <xsl:when test="references!=''">
533
                        <xsl:variable name="ref_id" select="references"/>
534
                        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
535
                          <xsl:for-each select="$references">
536
                              <xsl:choose>
537
                                 <xsl:when test="$displaymodule='entity'">
538
                                    <xsl:call-template name="dataTable">
539
                                        <xsl:with-param name="datatablefirstColStyle" select="$firstColStyle"/>
540
                                        <xsl:with-param name="datatablesubHeaderStyle" select="$subHeaderStyle"/>
541
                                        <xsl:with-param name="docid" select="$docid"/>
542
                                        <xsl:with-param name="entitytype" select="$entitytype"/>
543
                                        <xsl:with-param name="entityindex" select="$entityindex"/>
544
                                    </xsl:call-template>
545
                                 </xsl:when>
546
                                 <xsl:otherwise>
547
                                    <xsl:call-template name="chooseattributelist"/>
548
                                 </xsl:otherwise>
549
                              </xsl:choose>
550
                          </xsl:for-each>
551
                     </xsl:when>
552
                     <xsl:otherwise>
553
                       <xsl:choose>
554
                                 <xsl:when test="$displaymodule='entity'">
555
                                    <xsl:call-template name="dataTable">
556
                                        <xsl:with-param name="datatablefirstColStyle" select="$firstColStyle"/>
557
                                        <xsl:with-param name="datatablesubHeaderStyle" select="$subHeaderStyle"/>
558
                                        <xsl:with-param name="docid" select="$docid"/>
559
                                        <xsl:with-param name="entitytype" select="$entitytype"/>
560
                                        <xsl:with-param name="entityindex" select="$entityindex"/>
561
                                    </xsl:call-template>
562
                                 </xsl:when>
563
                                 <xsl:otherwise>
564
                                    <xsl:call-template name="chooseattributelist"/>
565
                                 </xsl:otherwise>
566
                       </xsl:choose>
567
                   </xsl:otherwise>
568
                </xsl:choose>
569
            </xsl:if>
570
        </xsl:for-each>
571
      </xsl:if>
572
      <xsl:if test="$entitytype='spatialRaster'">
573
        <xsl:for-each select="spatialRaster">
574
            <xsl:if test="position()=$entityindex">
575
                   <xsl:choose>
576
                     <xsl:when test="references!=''">
577
                        <xsl:variable name="ref_id" select="references"/>
578
                        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
579
                          <xsl:for-each select="$references">
580
                              <xsl:choose>
581
                                 <xsl:when test="$displaymodule='entity'">
582
                                    <xsl:call-template name="spatialRaster">
583
                                        <xsl:with-param name="spatialrasterfirstColStyle" select="$firstColStyle"/>
584
                                        <xsl:with-param name="spatialrastersubHeaderStyle" select="$subHeaderStyle"/>
585
                                        <xsl:with-param name="docid" select="$docid"/>
586
                                        <xsl:with-param name="entitytype" select="$entitytype"/>
587
                                        <xsl:with-param name="entityindex" select="$entityindex"/>
588
                                    </xsl:call-template>
589
                                 </xsl:when>
590
                                 <xsl:otherwise>
591
                                    <xsl:call-template name="chooseattributelist"/>
592
                                 </xsl:otherwise>
593
                              </xsl:choose>
594
                          </xsl:for-each>
595
                     </xsl:when>
596
                     <xsl:otherwise>
597
                       <xsl:choose>
598
                                 <xsl:when test="$displaymodule='entity'">
599
                                    <xsl:call-template name="spatialRaster">
600
                                        <xsl:with-param name="spatialrasterfirstColStyle" select="$firstColStyle"/>
601
                                        <xsl:with-param name="spatialrastersubHeaderStyle" select="$subHeaderStyle"/>
602
                                        <xsl:with-param name="docid" select="$docid"/>
603
                                        <xsl:with-param name="entitytype" select="$entitytype"/>
604
                                        <xsl:with-param name="entityindex" select="$entityindex"/>
605
                                    </xsl:call-template>
606
                                 </xsl:when>
607
                                 <xsl:otherwise>
608
                                    <xsl:call-template name="chooseattributelist"/>
609
                                 </xsl:otherwise>
610
                       </xsl:choose>
611
                   </xsl:otherwise>
612
                </xsl:choose>
613
            </xsl:if>
614
        </xsl:for-each>
615
      </xsl:if>
616
      <xsl:if test="$entitytype='spatialVector'">
617
        <xsl:for-each select="spatialVector">
618
            <xsl:if test="position()=$entityindex">
619
                   <xsl:choose>
620
                     <xsl:when test="references!=''">
621
                        <xsl:variable name="ref_id" select="references"/>
622
                        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
623
                          <xsl:for-each select="$references">
624
                              <xsl:choose>
625
                                 <xsl:when test="$displaymodule='entity'">
626
                                    <xsl:call-template name="spatialVector">
627
                                       <xsl:with-param name="spatialvectorfirstColStyle" select="$firstColStyle"/>
628
                                        <xsl:with-param name="spatialvectorsubHeaderStyle" select="$subHeaderStyle"/>
629
                                        <xsl:with-param name="docid" select="$docid"/>
630
                                        <xsl:with-param name="entitytype" select="$entitytype"/>
631
                                        <xsl:with-param name="entityindex" select="$entityindex"/>
632
                                    </xsl:call-template>
633
                                 </xsl:when>
634
                                 <xsl:otherwise>
635
                                    <xsl:call-template name="chooseattributelist"/>
636
                                 </xsl:otherwise>
637
                              </xsl:choose>
638
                          </xsl:for-each>
639
                     </xsl:when>
640
                     <xsl:otherwise>
641
                       <xsl:choose>
642
                                 <xsl:when test="$displaymodule='entity'">
643
                                    <xsl:call-template name="spatialVector">
644
                                        <xsl:with-param name="spatialvectorfirstColStyle" select="$firstColStyle"/>
645
                                        <xsl:with-param name="spatialvectorsubHeaderStyle" select="$subHeaderStyle"/>
646
                                        <xsl:with-param name="docid" select="$docid"/>
647
                                        <xsl:with-param name="entitytype" select="$entitytype"/>
648
                                        <xsl:with-param name="entityindex" select="$entityindex"/>
649
                                    </xsl:call-template>
650
                                 </xsl:when>
651
                                 <xsl:otherwise>
652
                                    <xsl:call-template name="chooseattributelist"/>
653
                                 </xsl:otherwise>
654
                       </xsl:choose>
655
                   </xsl:otherwise>
656
                </xsl:choose>
657
            </xsl:if>
658
        </xsl:for-each>
659
      </xsl:if>
660
      <xsl:if test="$entitytype='storedProcedure'">
661
        <xsl:for-each select="storedProcedure">
662
            <xsl:if test="position()=$entityindex">
663
                   <xsl:choose>
664
                     <xsl:when test="references!=''">
665
                        <xsl:variable name="ref_id" select="references"/>
666
                        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
667
                          <xsl:for-each select="$references">
668
                              <xsl:choose>
669
                                 <xsl:when test="$displaymodule='entity'">
670
                                    <xsl:call-template name="storedProcedure">
671
                                       <xsl:with-param name="storedprocedurefirstColStyle" select="$firstColStyle"/>
672
                                       <xsl:with-param name="storedproceduresubHeaderStyle" select="$subHeaderStyle"/>
673
                                       <xsl:with-param name="docid" select="$docid"/>
674
                                       <xsl:with-param name="entitytype" select="$entitytype"/>
675
                                       <xsl:with-param name="entityindex" select="$entityindex"/>
676
                                    </xsl:call-template>
677
                                 </xsl:when>
678
                                 <xsl:otherwise>
679
                                    <xsl:call-template name="chooseattributelist"/>
680
                                 </xsl:otherwise>
681
                              </xsl:choose>
682
                          </xsl:for-each>
683
                     </xsl:when>
684
                     <xsl:otherwise>
685
                       <xsl:choose>
686
                                 <xsl:when test="$displaymodule='entity'">
687
                                    <xsl:call-template name="storedProcedure">
688
                                       <xsl:with-param name="storedprocedurefirstColStyle" select="$firstColStyle"/>
689
                                       <xsl:with-param name="storedproceduresubHeaderStyle" select="$subHeaderStyle"/>
690
                                       <xsl:with-param name="docid" select="$docid"/>
691
                                       <xsl:with-param name="entitytype" select="$entitytype"/>
692
                                       <xsl:with-param name="entityindex" select="$entityindex"/>
693
                                    </xsl:call-template>
694
                                 </xsl:when>
695
                                 <xsl:otherwise>
696
                                    <xsl:call-template name="chooseattributelist"/>
697
                                 </xsl:otherwise>
698
                       </xsl:choose>
699
                   </xsl:otherwise>
700
                </xsl:choose>
701
            </xsl:if>
702
        </xsl:for-each>
703
      </xsl:if>
704
      <xsl:if test="$entitytype='view'">
705
        <xsl:for-each select="view">
706
            <xsl:if test="position()=$entityindex">
707
                   <xsl:choose>
708
                     <xsl:when test="references!=''">
709
                        <xsl:variable name="ref_id" select="references"/>
710
                        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
711
                          <xsl:for-each select="$references">
712
                              <xsl:choose>
713
                                 <xsl:when test="$displaymodule='entity'">
714
                                    <xsl:call-template name="view">
715
                                       <xsl:with-param name="viewfirstColStyle" select="$firstColStyle"/>
716
                                       <xsl:with-param name="viewsubHeaderStyle" select="$subHeaderStyle"/>
717
                                       <xsl:with-param name="docid" select="$docid"/>
718
                                       <xsl:with-param name="entitytype" select="$entitytype"/>
719
                                       <xsl:with-param name="entityindex" select="$entityindex"/>
720
                                    </xsl:call-template>
721
                                 </xsl:when>
722
                                 <xsl:otherwise>
723
                                    <xsl:call-template name="chooseattributelist"/>
724
                                 </xsl:otherwise>
725
                              </xsl:choose>
726
                          </xsl:for-each>
727
                     </xsl:when>
728
                     <xsl:otherwise>
729
                       <xsl:choose>
730
                                 <xsl:when test="$displaymodule='entity'">
731
                                    <xsl:call-template name="view">
732
                                       <xsl:with-param name="viewfirstColStyle" select="$firstColStyle"/>
733
                                       <xsl:with-param name="viewsubHeaderStyle" select="$subHeaderStyle"/>
734
                                       <xsl:with-param name="docid" select="$docid"/>
735
                                       <xsl:with-param name="entitytype" select="$entitytype"/>
736
                                       <xsl:with-param name="entityindex" select="$entityindex"/>
737
                                    </xsl:call-template>
738
                                 </xsl:when>
739
                                 <xsl:otherwise>
740
                                    <xsl:call-template name="chooseattributelist"/>
741
                                 </xsl:otherwise>
742
                       </xsl:choose>
743
                   </xsl:otherwise>
744
                </xsl:choose>
745
            </xsl:if>
746
        </xsl:for-each>
747
      </xsl:if>
748
      <xsl:if test="$entitytype='otherEntity'">
749
        <xsl:for-each select="otherEntity">
750
            <xsl:if test="position()=$entityindex">
751
                   <xsl:choose>
752
                     <xsl:when test="references!=''">
753
                        <xsl:variable name="ref_id" select="references"/>
754
                        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
755
                          <xsl:for-each select="$references">
756
                              <xsl:choose>
757
                                 <xsl:when test="$displaymodule='entity'">
758
                                    <xsl:call-template name="otherEntity">
759
                                       <xsl:with-param name="otherentityfirstColStyle" select="$firstColStyle"/>
760
                                       <xsl:with-param name="otherentitysubHeaderStyle" select="$subHeaderStyle"/>
761
                                       <xsl:with-param name="docid" select="$docid"/>
762
                                       <xsl:with-param name="entitytype" select="$entitytype"/>
763
                                       <xsl:with-param name="entityindex" select="$entityindex"/>
764
                                    </xsl:call-template>
765
                                 </xsl:when>
766
                                 <xsl:otherwise>
767
                                    <xsl:call-template name="chooseattributelist"/>
768
                                 </xsl:otherwise>
769
                              </xsl:choose>
770
                          </xsl:for-each>
771
                     </xsl:when>
772
                     <xsl:otherwise>
773
                       <xsl:choose>
774
                                 <xsl:when test="$displaymodule='entity'">
775
                                    <xsl:call-template name="otherEntity">
776
                                       <xsl:with-param name="otherentityfirstColStyle" select="$firstColStyle"/>
777
                                       <xsl:with-param name="otherentitysubHeaderStyle" select="$subHeaderStyle"/>
778
                                       <xsl:with-param name="docid" select="$docid"/>
779
                                       <xsl:with-param name="entitytype" select="$entitytype"/>
780
                                       <xsl:with-param name="entityindex" select="$entityindex"/>
781
                                    </xsl:call-template>
782
                                 </xsl:when>
783
                                 <xsl:otherwise>
784
                                    <xsl:call-template name="chooseattributelist"/>
785
                                 </xsl:otherwise>
786
                       </xsl:choose>
787
                   </xsl:otherwise>
788
                </xsl:choose>
789
            </xsl:if>
790
        </xsl:for-each>
791
      </xsl:if>
792
   </xsl:template>
793
794
   <xsl:template name="chooseattributelist">
795
       <xsl:for-each select="attributeList">
796
    <xsl:choose>
797
         <xsl:when test="references!=''">
798
            <xsl:variable name="ref_id" select="references"/>
799
            <xsl:variable name="references" select="$ids[@id=$ref_id]" />
800
            <xsl:for-each select="$references">
801
               <xsl:call-template name="chooseattribute"/>
802
           </xsl:for-each>
803
         </xsl:when>
804
         <xsl:otherwise>
805
             <xsl:call-template name="chooseattribute"/>
806
        </xsl:otherwise>
807
   </xsl:choose>
808
      </xsl:for-each>
809
   </xsl:template>
810
811
   <xsl:template name="chooseattribute">
812
       <xsl:for-each select="attribute">
813
    <xsl:if test="position()=$attributeindex">
814
      <xsl:if test="$displaymodule='attributedomain'">
815
        <xsl:for-each select="measurementScale/*/*">
816
          <xsl:call-template name="nonNumericDomain">
817
              <xsl:with-param name="nondomainfirstColStyle" select="$firstColStyle"/>
818
           </xsl:call-template>
819
        </xsl:for-each>
820
     </xsl:if>
821
     <xsl:if test="$displaymodule='attributecoverage'">
822
        <xsl:for-each select="coverage">
823
          <xsl:call-template name="coverage">
824
          </xsl:call-template>
825
        </xsl:for-each>
826
     </xsl:if>
827
     <xsl:if test="$displaymodule='attributemethod'">
828
        <xsl:for-each select="method">
829
          <xsl:call-template name="method">
830
              <xsl:with-param name="methodfirstColStyle" select="$firstColStyle"/>
831
              <xsl:with-param name="methodsubHeaderStyle" select="$firstColStyle"/>
832
           </xsl:call-template>
833
        </xsl:for-each>
834
     </xsl:if>
835
   </xsl:if>
836
       </xsl:for-each>
837
   </xsl:template>
838
839
840
841
   <!--*************************Distribution Inline Data display module*****************-->
842
   <xsl:template name="emlinlinedata">
843
      <tr><td>
844
      <h3>Inline Data</h3>
845
      </td></tr>
846
      <tr>
847
     <td>
848
      <xsl:if test="$distributionlevel='toplevel'">
849
         <xsl:for-each select="distribution">
850
            <xsl:if test="position()=$distributionindex">
851
               <xsl:choose>
852
                 <xsl:when test="references!=''">
853
                    <xsl:variable name="ref_id1" select="references"/>
854
                    <xsl:variable name="references1" select="$ids[@id=$ref_id1]" />
855
                    <xsl:for-each select="$references1">
856
                        <xsl:for-each select="inline">
857
                            <xsl:value-of select="."/>
858
                        </xsl:for-each>
859
                    </xsl:for-each>
860
                 </xsl:when>
861
                 <xsl:otherwise>
862
                     <xsl:for-each select="inline">
863
                            <xsl:value-of select="."/>
864
                     </xsl:for-each>
865
                 </xsl:otherwise>
866
               </xsl:choose>
867
            </xsl:if>
868
         </xsl:for-each>
869
      </xsl:if>
870
      <xsl:if test="$distributionlevel='entitylevel'">
871
        <xsl:if test="$entitytype='dataTable'">
872
          <xsl:for-each select="dataTable">
873
            <xsl:if test="position()=$entityindex">
874
                <xsl:choose>
875
                 <xsl:when test="references!=''">
876
                    <xsl:variable name="ref_id2" select="references"/>
877
                    <xsl:variable name="references2" select="$ids[@id=$ref_id2]" />
878
                    <xsl:for-each select="$references2">
879
                       <xsl:call-template name="choosephysical"/>
880
                    </xsl:for-each>
881
                 </xsl:when>
882
                 <xsl:otherwise>
883
                     <xsl:call-template name="choosephysical"/>
884
                 </xsl:otherwise>
885
               </xsl:choose>
886
            </xsl:if>
887
          </xsl:for-each>
888
        </xsl:if>
889
        <xsl:if test="$entitytype='spatialRaster'">
890
          <xsl:for-each select="spatialRaster">
891
            <xsl:if test="position()=$entityindex">
892
                <xsl:choose>
893
                 <xsl:when test="references!=''">
894
                    <xsl:variable name="ref_id2" select="references"/>
895
                    <xsl:variable name="references2" select="$ids[@id=$ref_id2]" />
896
                    <xsl:for-each select="$references2">
897
                       <xsl:call-template name="choosephysical"/>
898
                    </xsl:for-each>
899
                 </xsl:when>
900
                 <xsl:otherwise>
901
                     <xsl:call-template name="choosephysical"/>
902
                 </xsl:otherwise>
903
               </xsl:choose>
904
            </xsl:if>
905
          </xsl:for-each>
906
        </xsl:if>
907
        <xsl:if test="$entitytype='spatialVector'">
908
          <xsl:for-each select="spatialVector">
909
            <xsl:if test="position()=$entityindex">
910
                <xsl:choose>
911
                 <xsl:when test="references!=''">
912
                    <xsl:variable name="ref_id2" select="references"/>
913
                    <xsl:variable name="references2" select="$ids[@id=$ref_id2]" />
914
                    <xsl:for-each select="$references2">
915
                       <xsl:call-template name="choosephysical"/>
916
                    </xsl:for-each>
917
                 </xsl:when>
918
                 <xsl:otherwise>
919
                     <xsl:call-template name="choosephysical"/>
920
                 </xsl:otherwise>
921
               </xsl:choose>
922
            </xsl:if>
923
          </xsl:for-each>
924
        </xsl:if>
925
        <xsl:if test="$entitytype='storedProcedure'">
926
          <xsl:for-each select="storedProcedure">
927
            <xsl:if test="position()=$entityindex">
928
                <xsl:choose>
929
                 <xsl:when test="references!=''">
930
                    <xsl:variable name="ref_id2" select="references"/>
931
                    <xsl:variable name="references2" select="$ids[@id=$ref_id2]" />
932
                    <xsl:for-each select="$references2">
933
                       <xsl:call-template name="choosephysical"/>
934
                    </xsl:for-each>
935
                 </xsl:when>
936
                 <xsl:otherwise>
937
                     <xsl:call-template name="choosephysical"/>
938
                 </xsl:otherwise>
939
               </xsl:choose>
940
            </xsl:if>
941
          </xsl:for-each>
942
        </xsl:if>
943
        <xsl:if test="$entitytype='view'">
944
          <xsl:for-each select="view">
945
            <xsl:if test="position()=$entityindex">
946
                <xsl:choose>
947
                 <xsl:when test="references!=''">
948
                    <xsl:variable name="ref_id2" select="references"/>
949
                    <xsl:variable name="references2" select="$ids[@id=$ref_id2]" />
950
                    <xsl:for-each select="$references2">
951
                       <xsl:call-template name="choosephysical"/>
952
                    </xsl:for-each>
953
                 </xsl:when>
954
                 <xsl:otherwise>
955
                     <xsl:call-template name="choosephysical"/>
956
                 </xsl:otherwise>
957
               </xsl:choose>
958
            </xsl:if>
959
          </xsl:for-each>
960
        </xsl:if>
961
        <xsl:if test="$entitytype='otherEntity'">
962
          <xsl:for-each select="otherEntity">
963
            <xsl:if test="position()=$entityindex">
964
                <xsl:choose>
965
                 <xsl:when test="references!=''">
966
                    <xsl:variable name="ref_id2" select="references"/>
967
                    <xsl:variable name="references2" select="$ids[@id=$ref_id2]" />
968
                    <xsl:for-each select="$references2">
969
                       <xsl:call-template name="choosephysical"/>
970
                    </xsl:for-each>
971
                 </xsl:when>
972
                 <xsl:otherwise>
973
                     <xsl:call-template name="choosephysical"/>
974
                 </xsl:otherwise>
975
               </xsl:choose>
976
            </xsl:if>
977
          </xsl:for-each>
978
        </xsl:if>
979
      </xsl:if>
980
    </td>
981
      </tr>
982
   </xsl:template>
983
984
   <xsl:template name="choosephysical">
985
      <xsl:for-each select="physical">
986
   <xsl:if test="position()=$physicalindex">
987
      <xsl:choose>
988
         <xsl:when test="references!=''">
989
            <xsl:variable name="ref_id" select="references"/>
990
            <xsl:variable name="references" select="$ids[@id=$ref_id]" />
991
            <xsl:for-each select="$references">
992
               <xsl:call-template name="choosedistribution"/>
993
            </xsl:for-each>
994
         </xsl:when>
995
         <xsl:otherwise>
996
            <xsl:call-template name="choosedistribution"/>
997
        </xsl:otherwise>
998
     </xsl:choose>
999
  </xsl:if>
1000
      </xsl:for-each>
1001
   </xsl:template>
1002
1003
   <xsl:template name="choosedistribution">
1004
      <xsl:for-each select="distribution">
1005
   <xsl:if test="$distributionindex=position()">
1006
      <xsl:choose>
1007
         <xsl:when test="references!=''">
1008
            <xsl:variable name="ref_id" select="references"/>
1009
            <xsl:variable name="references" select="$ids[@id=$ref_id]" />
1010
            <xsl:for-each select="$references">
1011
               <xsl:for-each select="inline">
1012
                  <xsl:value-of select="."/>
1013
                </xsl:for-each>
1014
            </xsl:for-each>
1015
         </xsl:when>
1016
         <xsl:otherwise>
1017
            <xsl:for-each select="inline">
1018
              <xsl:value-of select="."/>
1019
            </xsl:for-each>
1020
        </xsl:otherwise>
1021
     </xsl:choose>
1022
  </xsl:if>
1023
      </xsl:for-each>
1024
   </xsl:template>
1025
1026
1027
     <!--********************************************************
1028
               Citation part
1029
       ********************************************************-->
1030
   <xsl:template name="emlcitation">
1031
     <xsl:choose>
1032
       <xsl:when test="$displaymodule='inlinedata'">
1033
    <xsl:call-template name="emlinlinedata"/>
1034
       </xsl:when>
1035
       <xsl:otherwise>
1036
  <table xsl:use-attribute-sets="cellspacing" class="{$tabledefaultStyle}">
1037
  <tr>
1038
    <td colspan="2">
1039
         <h3>Citation Description</h3>
1040
    </td>
1041
  </tr>
1042
  <xsl:call-template name="identifier">
1043
        <xsl:with-param name="packageID" select="../@packageId"/>
1044
        <xsl:with-param name="system" select="../@system"/>
1045
  </xsl:call-template>
1046
  <tr>
1047
    <td colspan="2">
1048
      <xsl:call-template name="citation">
1049
         <xsl:with-param name="citationfirstColStyle" select="$firstColStyle"/>
1050
         <xsl:with-param name="citationsubHeaderStyle" select="$subHeaderStyle"/>
1051
     </xsl:call-template>
1052
    </td>
1053
  </tr>
1054
      </table>
1055
     </xsl:otherwise>
1056
    </xsl:choose>
1057
   </xsl:template>
1058
1059
1060
1061
     <!--********************************************************
1062
              Software part
1063
       ********************************************************-->
1064
1065
   <xsl:template name="emlsoftware">
1066
     <xsl:choose>
1067
       <xsl:when test="$displaymodule='inlinedata'">
1068
    <xsl:call-template name="emlinlinedata"/>
1069
       </xsl:when>
1070
       <xsl:otherwise>
1071
    <table xsl:use-attribute-sets="cellspacing" class="{$tabledefaultStyle}">
1072
    <tr>
1073
      <td colspan="2">
1074
         <h3>Software Description</h3>
1075
     </td>
1076
    </tr>
1077
    <xsl:call-template name="identifier">
1078
        <xsl:with-param name="packageID" select="../@packageId"/>
1079
        <xsl:with-param name="system" select="../@system"/>
1080
    </xsl:call-template>
1081
    <tr>
1082
     <td colspan="2">
1083
      <xsl:call-template name="software">
1084
         <xsl:with-param name="softwarefirstColStyle" select="$firstColStyle"/>
1085
         <xsl:with-param name="softwaresubHeaderStyle" select="$subHeaderStyle"/>
1086
     </xsl:call-template>
1087
     </td>
1088
   </tr>
1089
       </table>
1090
      </xsl:otherwise>
1091
     </xsl:choose>
1092
   </xsl:template>
1093
1094
1095
     <!--********************************************************
1096
              Protocal part
1097
       ********************************************************-->
1098
1099
   <xsl:template name="emlprotocol">
1100
    <xsl:choose>
1101
       <xsl:when test="$displaymodule='inlinedata'">
1102
    <xsl:call-template name="emlinlinedata"/>
1103
       </xsl:when>
1104
       <xsl:otherwise>
1105
  <table xsl:use-attribute-sets="cellspacing" class="{$tabledefaultStyle}">
1106
   <tr>
1107
    <td colspan="2">
1108
         <h3>Protocal Description</h3>
1109
    </td>
1110
   </tr>
1111
   <xsl:call-template name="identifier">
1112
        <xsl:with-param name="packageID" select="../@packageId"/>
1113
        <xsl:with-param name="system" select="../@system"/>
1114
   </xsl:call-template>
1115
   <tr>
1116
    <td colspan="2">
1117
      <xsl:call-template name="protocol">
1118
         <xsl:with-param name="protocolfirstColStyle" select="$firstColStyle"/>
1119
         <xsl:with-param name="protocolsubHeaderStyle" select="$subHeaderStyle"/>
1120
     </xsl:call-template>
1121
    </td>
1122
   </tr>
1123
       </table>
1124
      </xsl:otherwise>
1125
    </xsl:choose>
1126
   </xsl:template>
1127
1128
      <!--********************************************************
1129
             additionalmetadata part
1130
       ********************************************************-->
1131
   <xsl:template name="additionalmetadataURL">
1132
     <xsl:param name="index"/>
1133
     <table class="{$tabledefaultStyle}">
1134
       <tr>
1135
         <td>
1136
           <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>
1137
             Additional Metadata
1138
           </a>
1139
         </td>
1140
       </tr>
1141
     </table>
1142
   </xsl:template>
1143
     <!--********************************************************
1144
             download xml part
1145
       ********************************************************-->
1146
   <xsl:template name="xml">
1147
     <xsl:param name="index"/>
1148
        <br />
1149
        <a>
1150
          <xsl:attribute name="href">
1151
            <xsl:value-of select="$xmlURI"/>
1152
            <xsl:value-of select="$docid"/>
1153
          </xsl:attribute>
1154
          View the original XML Data (EML format)
1155
        </a>
1156
   </xsl:template>
1157
</xsl:stylesheet>