Project

General

Profile

metacat / lib / style / eml2 / eml-2.0.0.xsl @ 1689

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: tao $'
10
  *     '$Date: 2003-06-25 17:58:51 -0700 (Wed, 25 Jun 2003) $'
11
  * '$Revision: 1689 $'
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-2.0.0.xsl"/>
34
  <xsl:import href="eml-additionalmetadata-2.0.0.xsl"/>
35
  <xsl:import href="eml-attribute-2.0.0.xsl"/>
36
  <xsl:import href="eml-attribute-enumeratedDomain-2.0.0.xsl"/>
37
  <xsl:import href="eml-constraint-2.0.0.xsl"/>
38
  <xsl:import href="eml-coverage-2.0.0.xsl"/>
39
  <xsl:import href="eml-dataset-2.0.0.xsl"/>
40
  <xsl:import href="eml-datatable-2.0.0.xsl"/>
41
  <xsl:import href="eml-distribution-2.0.0.xsl"/>
42
  <xsl:import href="eml-entity-2.0.0.xsl"/>
43
  <xsl:import href="eml-identifier-2.0.0.xsl"/>
44
  <xsl:import href="eml-literature-2.0.0.xsl"/>
45
  <xsl:import href="eml-method-2.0.0.xsl"/>
46
  <xsl:import href="eml-otherentity-2.0.0.xsl"/>
47
  <xsl:import href="eml-party-2.0.0.xsl"/>
48
  <xsl:import href="eml-physical-2.0.0.xsl"/>
49
  <xsl:import href="eml-project-2.0.0.xsl"/>
50
  <xsl:import href="eml-protocol-2.0.0.xsl"/>
51
  <xsl:import href="eml-resource-2.0.0.xsl"/>
52
  <xsl:import href="eml-settings-2.0.0.xsl"/>
53
  <xsl:import href="eml-software-2.0.0.xsl"/>
54
  <xsl:import href="eml-spatialraster-2.0.0.xsl"/>
55
  <xsl:import href="eml-spatialvector-2.0.0.xsl"/>
56
  <xsl:import href="eml-storedprocedure-2.0.0.xsl"/>
57
  <xsl:import href="eml-text-2.0.0.xsl"/>
58
  <xsl:import href="eml-view-2.0.0.xsl"/>
59
  
60
  <xsl:output method="html" encoding="iso-8859-1"/>
61
  <!-- global variables to store id node set in case to be referenced-->
62
  <xsl:variable name="ids" select="//*[@id!='']"/>
63
  
64
  <xsl:template match="/">
65
    <html>
66
      <head>
67
        <link rel="stylesheet" type="text/css" 
68
              href="{$stylePath}/{$qformat}.css" />
69
      </head>
70
      <body>
71
          <table width="100%">
72
          <tr>
73
            <td rowspan="2"><img src="@web-base-url@/images/KNBLogo.gif"/></td>
74
            <td colspan="7"><div class="title">Biocomplexity Data Search</div>
75
            </td>
76
          </tr>
77
          <tr>
78
            <td><a href="@web-base-url@" class="toollink"> KNB </a></td>
79
            <td><a href="@web-base-url@/data.html" class="toollink"> 
80
                Data </a></td>
81
            <td><a href="@web-base-url@/people.html" class="toollink"> 
82
                People </a></td>
83
            <td><a href="@web-base-url@/informatics" class="toollink"> 
84
                Informatics </a></td>
85
            <td><a href="@web-base-url@/biodiversity" class="toollink"> 
86
                Biodiversity </a></td>
87
            <td><a href="@web-base-url@/education" class="toollink"> 
88
                Education </a></td>
89
            <td><a href="@web-base-url@/software" class="toollink"> 
90
                Software </a></td>
91
         </tr>
92
         <tr>
93
          <td align="right" valign="top" colspan="7">
94
            <form action="@html-path@/servlet/metacat" method="POST">
95
             Data Search: <input type="text" name="anyfield" size="10" />
96
             <input type="hidden" name="action" value="query" />   
97
             <input type="hidden" name="qformat" value="knb" />
98
             <input type="hidden" name="operator" value="UNION" />
99
             
100
             <input type="hidden" name="returnfield"
101
              value="creator/individualName/surName" />
102
             <input type="hidden" name="returnfield"
103
              value="creator/organizationName" />
104
             <input type="hidden" name="returnfield" 
105
              value="originator/individualName/surName" />
106
             <input type="hidden" name="returnfield" 
107
              value="originator/individualName/givenName" />
108
             <input type="hidden" name="returnfield" 
109
              value="originator/organizationName" />
110
             <input type="hidden" name="returnfield" 
111
              value="title" />
112
             <input type="hidden" name="returnfield" 
113
              value="keyword" />
114
             <input type="hidden" name="returndoctype"
115
              value="eml://ecoinformatics.org/eml-2.0.0" />
116
             <input type="hidden" name="returndoctype"
117
              value="-//NCEAS//eml-dataset-2.0//EN" />
118
             <input type="hidden" name="returndoctype"
119
              value="-//NCEAS//resource//EN" />
120
             <input type="hidden" name="returndoctype"
121
              value="-//NCEAS//eml-dataset//EN" />
122
              <input type="hidden" name="returndoctype"
123
              value="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN" />
124
              <input type="hidden" name="returndoctype"
125
              value="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN" />
126
           </form>
127
          </td>
128
        </tr>  
129
       </table>
130
        <xsl:apply-templates select="*[local-name()='eml']"/>
131
      </body>
132
    </html>
133
   </xsl:template>
134
   
135
   <xsl:template match="*[local-name()='eml']">
136
       <xsl:for-each select="dataset">
137
         <xsl:call-template name="emldataset"/>
138
       </xsl:for-each>
139
       <xsl:for-each select="citation">
140
         <xsl:call-template name="emlcitation"/>
141
       </xsl:for-each>
142
       <xsl:for-each select="software">
143
         <xsl:call-template name="emlsoftware"/>
144
       </xsl:for-each>
145
       <xsl:for-each select="protocol">
146
         <xsl:call-template name="emlprotocol"/>
147
       </xsl:for-each>
148
       <!-- Additinal metadata-->
149
       <xsl:choose>
150
               <xsl:when test="$displaymodule='additionalmetadata'">
151
                   <xsl:for-each select="additionalMetadata"> 
152
                     <xsl:if test="$additionalmetadataindex=position()">
153
                        <xsl:call-template name="additionalmetadata"/>
154
                     </xsl:if>
155
                  </xsl:for-each>
156
               </xsl:when>
157
               <xsl:otherwise>
158
                 <xsl:if test="$displaymodule='dataset'">
159
                   <xsl:for-each select="additionalMetadata">
160
                      <xsl:call-template name="additionalmetadataURL">
161
                        <xsl:with-param name="index" select="position()"/>
162
                      </xsl:call-template>
163
                   </xsl:for-each>
164
                 </xsl:if>
165
              </xsl:otherwise>
166
       </xsl:choose>
167
   </xsl:template>
168
   
169
   <!--********************************************************
170
                             dataset part
171
       ********************************************************-->
172
   
173
   <xsl:template name="emldataset">
174
      <table class="tabledefault" width="100%">
175
          <xsl:if test="$displaymodule='dataset'">
176
             <xsl:call-template name="datasetpart"/>  
177
          </xsl:if>
178
          <xsl:if test="$displaymodule='entity'">
179
             <xsl:call-template name="entitypart"/>
180
          </xsl:if>
181
          <xsl:if test="$displaymodule='attribute'">
182
             <xsl:call-template name="attributepart"/>
183
          </xsl:if>
184
          <xsl:if test="$displaymodule='attributedomain'">
185
             <xsl:call-template name="datasetattributedomain"/>
186
          </xsl:if>
187
          <xsl:if test="$displaymodule='attributecoverage'">
188
             <xsl:call-template name="datasetattributecoverage"/>
189
          </xsl:if>
190
          <xsl:if test="$displaymodule='attributemethod'">
191
             <xsl:call-template name="datasetattributemethod"/>
192
          </xsl:if>
193
          <xsl:if test="$displaymodule='inlinedata'">
194
             <xsl:call-template name="datasetinlinedata"/>
195
          </xsl:if>
196
      </table>
197
   </xsl:template>
198
   
199
   <!--*************** Data set part *************-->
200
   <xsl:template name="datasetpart">
201
      <tr><td colspan="2" width="100%">
202
         <right>
203
            <h3>Data Set Description</h3>
204
         </right>
205
      </td></tr>
206
       <xsl:call-template name="identifier">
207
                <xsl:with-param name="packageID" select="../@packageId"/>
208
                <xsl:with-param name="system" select="../@system"/>
209
      </xsl:call-template>
210
      <tr>
211
           <td colspan="2" width="100%">
212
              <xsl:apply-templates select="." mode="dataset"/>
213
           </td>
214
      </tr>  
215
   </xsl:template>
216
   
217
   <!--************ Entity part *****************-->
218
    <xsl:template name="entitypart">
219
      <tr><td colspan="2" width="100%" >
220
         <right>
221
            <h3>Entity Description</h3>
222
          </right>
223
      </td></tr>
224
      <xsl:call-template name="identifier">
225
                <xsl:with-param name="packageID" select="../@packageId"/>
226
                <xsl:with-param name="system" select="../@system"/>
227
      </xsl:call-template>
228
     
229
      <tr>
230
           <td width="100%" colspan="2">
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:call-template name="dataTable">
236
                         <xsl:with-param name="datatablefirstColStyle" select="$firstColStyle"/>
237
                         <xsl:with-param name="datatablesubHeaderStyle" select="$subHeaderStyle"/>  
238
                         <xsl:with-param name="docid" select="$docid"/>
239
                         <xsl:with-param name="entitytype" select="$entitytype"/>
240
                         <xsl:with-param name="entityindex" select="$entityindex"/>
241
                     </xsl:call-template>
242
                  </xsl:if>
243
              </xsl:for-each>
244
            </xsl:if>
245
            <xsl:if test="$entitytype='spatialRaster'">
246
               <xsl:for-each select="spatialRaster">
247
                  <xsl:if test="position()=$entityindex">
248
                     <xsl:call-template name="spatialRaster">
249
                         <xsl:with-param name="spatialrasterfirstColStyle" select="$firstColStyle"/>
250
                         <xsl:with-param name="spatialrastersubHeaderStyle" select="$subHeaderStyle"/>  
251
                         <xsl:with-param name="docid" select="$docid"/>
252
                         <xsl:with-param name="entitytype" select="$entitytype"/>
253
                         <xsl:with-param name="entityindex" select="$entityindex"/>
254
                     </xsl:call-template>
255
                  </xsl:if>
256
              </xsl:for-each>
257
            </xsl:if>
258
            <xsl:if test="$entitytype='spatialVector'">
259
               <xsl:for-each select="spatialVector">
260
                  <xsl:if test="position()=$entityindex">
261
                     <xsl:call-template name="spatialVector">
262
                         <xsl:with-param name="spatialvectorfirstColStyle" select="$firstColStyle"/>
263
                         <xsl:with-param name="spatialvectorsubHeaderStyle" select="$subHeaderStyle"/>  
264
                         <xsl:with-param name="docid" select="$docid"/>
265
                         <xsl:with-param name="entitytype" select="$entitytype"/>
266
                         <xsl:with-param name="entityindex" select="$entityindex"/>
267
                     </xsl:call-template>
268
                  </xsl:if>
269
              </xsl:for-each>
270
            </xsl:if>
271
            <xsl:if test="$entitytype='storedProcedure'">
272
               <xsl:for-each select="storedProcedure">
273
                  <xsl:if test="position()=$entityindex">
274
                     <xsl:call-template name="storedProcedure">
275
                         <xsl:with-param name="storedprocedurefirstColStyle" select="$firstColStyle"/>
276
                         <xsl:with-param name="storedproceduresubHeaderStyle" select="$subHeaderStyle"/>  
277
                         <xsl:with-param name="docid" select="$docid"/>
278
                         <xsl:with-param name="entitytype" select="$entitytype"/>
279
                         <xsl:with-param name="entityindex" select="$entityindex"/>
280
                     </xsl:call-template>
281
                  </xsl:if>
282
              </xsl:for-each>
283
            </xsl:if>
284
            <xsl:if test="$entitytype='view'">
285
               <xsl:for-each select="view">
286
                  <xsl:if test="position()=$entityindex">
287
                     <xsl:call-template name="view">
288
                         <xsl:with-param name="viewfirstColStyle" select="$firstColStyle"/>
289
                         <xsl:with-param name="viewsubHeaderStyle" select="$subHeaderStyle"/>  
290
                         <xsl:with-param name="docid" select="$docid"/>
291
                         <xsl:with-param name="entitytype" select="$entitytype"/>
292
                         <xsl:with-param name="entityindex" select="$entityindex"/>
293
                     </xsl:call-template>
294
                  </xsl:if>
295
              </xsl:for-each>
296
            </xsl:if>
297
            <xsl:if test="$entitytype='otherEntity'">
298
               <xsl:for-each select="view">
299
                  <xsl:if test="position()=$entityindex">
300
                     <xsl:call-template name="otherEntity">
301
                         <xsl:with-param name="otherentityfirstColStyle" select="$firstColStyle"/>
302
                         <xsl:with-param name="otherentitysubHeaderStyle" select="$subHeaderStyle"/>  
303
                         <xsl:with-param name="docid" select="$docid"/>
304
                         <xsl:with-param name="entitytype" select="$entitytype"/>
305
                         <xsl:with-param name="entityindex" select="$entityindex"/>
306
                     </xsl:call-template>
307
                  </xsl:if>
308
              </xsl:for-each>
309
            </xsl:if>
310
          </td>
311
      </tr>  
312
   </xsl:template>
313
   
314
   <!--************ Attribute part *****************-->
315
    <xsl:template name="attributepart">
316
      <tr><td width="100%">
317
         <right>
318
            <h3>Attributes Description</h3>
319
         </right>
320
      </td></tr>
321
      <tr>
322
           <td width="100%">
323
              <!-- find the subtree to process -->
324
            <xsl:if test="$entitytype='dataTable'">
325
              <xsl:for-each select="dataTable">
326
                  <xsl:if test="position()=$entityindex">
327
                      <xsl:for-each select="attributeList">
328
                         <xsl:call-template name="attributelist">
329
                            <xsl:with-param name="docid" select="$docid"/>
330
                            <xsl:with-param name="entitytype" select="$entitytype"/>
331
                            <xsl:with-param name="entityindex" select="$entityindex"/>
332
                         </xsl:call-template>
333
                      </xsl:for-each>
334
                  </xsl:if>
335
              </xsl:for-each>
336
            </xsl:if>
337
          </td>
338
      </tr>  
339
   </xsl:template>
340
   
341
   <!--************************Attribute Domain************************-->
342
   <xsl:template name="datasetattributedomain">
343
      <tr><td>
344
         <right>
345
            <h3>Attributes Domain</h3>
346
         </right>
347
      </td></tr>
348
      <tr>
349
           <td width="100%">
350
              <!-- find the subtree to process -->
351
            <xsl:if test="$entitytype='dataTable'">
352
              <xsl:for-each select="dataTable">
353
                  <xsl:if test="position()=$entityindex">
354
                      <xsl:for-each select="attributeList">
355
                         <xsl:for-each select="attribute">
356
                            <xsl:if test="position()=$attributeindex">
357
                              <xsl:for-each select="measurementScale/*/*">
358
                                  <xsl:call-template name="nonNumericDomain">
359
                                      <xsl:with-param name="nondomainfirstColStyle" select="$firstColStyle"/>
360
                                  </xsl:call-template>
361
                                </xsl:for-each>
362
                              </xsl:if>
363
                          </xsl:for-each>
364
                      </xsl:for-each>
365
                  </xsl:if>
366
              </xsl:for-each>
367
            </xsl:if>
368
             <xsl:if test="$entitytype='spatialRaster'">
369
              <xsl:for-each select="spatialRaster">
370
                  <xsl:if test="position()=$entityindex">
371
                      <xsl:for-each select="attributeList">
372
                         <xsl:for-each select="attribute">
373
                            <xsl:if test="position()=$attributeindex">
374
                              <xsl:for-each select="measurementScale/*/*">
375
                                  <xsl:call-template name="nonNumericDomain">
376
                                      <xsl:with-param name="nondomainfirstColStyle" select="$firstColStyle"/>
377
                                  </xsl:call-template>
378
                                </xsl:for-each>
379
                              </xsl:if>
380
                          </xsl:for-each>
381
                      </xsl:for-each>
382
                  </xsl:if>
383
              </xsl:for-each>
384
            </xsl:if>
385
             <xsl:if test="$entitytype='spatialVector'">
386
              <xsl:for-each select="spatialVector">
387
                  <xsl:if test="position()=$entityindex">
388
                      <xsl:for-each select="attributeList">
389
                         <xsl:for-each select="attribute">
390
                            <xsl:if test="position()=$attributeindex">
391
                              <xsl:for-each select="measurementScale/*/*">
392
                                  <xsl:call-template name="nonNumericDomain">
393
                                      <xsl:with-param name="nondomainfirstColStyle" select="$firstColStyle"/>
394
                                  </xsl:call-template>
395
                                </xsl:for-each>
396
                              </xsl:if>
397
                          </xsl:for-each>
398
                      </xsl:for-each>
399
                  </xsl:if>
400
              </xsl:for-each>
401
            </xsl:if>
402
             <xsl:if test="$entitytype='storedProcedure'">
403
              <xsl:for-each select="storedProcedure">
404
                  <xsl:if test="position()=$entityindex">
405
                      <xsl:for-each select="attributeList">
406
                         <xsl:for-each select="attribute">
407
                            <xsl:if test="position()=$attributeindex">
408
                              <xsl:for-each select="measurementScale/*/*">
409
                                  <xsl:call-template name="nonNumericDomain">
410
                                      <xsl:with-param name="nondomainfirstColStyle" select="$firstColStyle"/>
411
                                  </xsl:call-template>
412
                                </xsl:for-each>
413
                              </xsl:if>
414
                          </xsl:for-each>
415
                      </xsl:for-each>
416
                  </xsl:if>
417
              </xsl:for-each>
418
            </xsl:if>
419
             <xsl:if test="$entitytype='view'">
420
              <xsl:for-each select="view">
421
                  <xsl:if test="position()=$entityindex">
422
                      <xsl:for-each select="attributeList">
423
                         <xsl:for-each select="attribute">
424
                            <xsl:if test="position()=$attributeindex">
425
                              <xsl:for-each select="measurementScale/*/*">
426
                                  <xsl:call-template name="nonNumericDomain">
427
                                      <xsl:with-param name="nondomainfirstColStyle" select="$firstColStyle"/>
428
                                  </xsl:call-template>
429
                                </xsl:for-each>
430
                              </xsl:if>
431
                          </xsl:for-each>
432
                      </xsl:for-each>
433
                  </xsl:if>
434
              </xsl:for-each>
435
            </xsl:if>
436
             <xsl:if test="$entitytype='otherEntity'">
437
              <xsl:for-each select="otherEntity">
438
                  <xsl:if test="position()=$entityindex">
439
                      <xsl:for-each select="attributeList">
440
                         <xsl:for-each select="attribute">
441
                            <xsl:if test="position()=$attributeindex">
442
                              <xsl:for-each select="measurementScale/*/*">
443
                                  <xsl:call-template name="nonNumericDomain">
444
                                      <xsl:with-param name="nondomainfirstColStyle" select="$firstColStyle"/>
445
                                  </xsl:call-template>
446
                                </xsl:for-each>
447
                              </xsl:if>
448
                          </xsl:for-each>
449
                      </xsl:for-each>
450
                  </xsl:if>
451
              </xsl:for-each>
452
            </xsl:if>
453
            
454
          </td>
455
      </tr>  
456
   </xsl:template>
457
   
458
   
459
   <!--************************Attribute Method************************-->
460
   <xsl:template name="datasetattributemethod">
461
       
462
   </xsl:template>
463
   
464
   
465
   <!--************************Attribute Coverage************************-->
466
   <xsl:template name="datasetattributecoverage">
467
   </xsl:template>
468
   
469
   <!--*************************Distribution Inline Data*****************-->
470
   <xsl:template name="datasetinlinedata">
471
      <tr><td>
472
         <right>
473
            <h3>Inline Data</h3>
474
         </right>
475
      </td></tr>
476
      <tr>
477
           <td width="100%">
478
            <xsl:if test="$distributionlevel='toplevel'">
479
               <xsl:for-each select="distribution">
480
                  <xsl:if test="position=$distributionindex">
481
                     <xsl:choose>
482
                       <xsl:when test="references!=''">
483
                          <xsl:variable name="ref_id1" select="references"/>
484
                          <xsl:variable name="references1" select="$ids[@id=$ref_id1]" />
485
                          <xsl:for-each select="$references1">
486
                              <xsl:for-each select="inline">
487
                                  <xsl:value-of select="."/>
488
                              </xsl:for-each>
489
                          </xsl:for-each>
490
                       </xsl:when>
491
                       <xsl:otherwise>
492
                           <xsl:for-each select="inline">
493
                                  <xsl:value-of select="."/>
494
                           </xsl:for-each>
495
                       </xsl:otherwise>
496
                     </xsl:choose>
497
                  </xsl:if>
498
               </xsl:for-each>
499
            </xsl:if>
500
            <xsl:if test="$distributionlevel='entitylevel'">
501
              <xsl:if test="$entitytype='dataTable'">
502
                <xsl:for-each select="dataTable">
503
                  <xsl:if test="position()=$entityindex">
504
                      <xsl:choose>
505
                       <xsl:when test="references!=''">
506
                          <xsl:variable name="ref_id2" select="references"/>
507
                          <xsl:variable name="references2" select="$ids[@id=$ref_id2]" />
508
                          <xsl:for-each select="$references2">
509
                             <xsl:call-template name="choosephysical"/>
510
                          </xsl:for-each>
511
                       </xsl:when>
512
                       <xsl:otherwise>
513
                           <xsl:call-template name="choosephysical"/>
514
                       </xsl:otherwise>
515
                     </xsl:choose>
516
                  </xsl:if>
517
                </xsl:for-each>
518
              </xsl:if>
519
            </xsl:if>
520
          </td>
521
      </tr>  
522
   </xsl:template>
523
   
524
   <xsl:template name="choosephysical">
525
      <xsl:for-each select="physical">
526
         <xsl:if test="position()=$physicalindex">-->
527
            <xsl:choose>
528
               <xsl:when test="references!=''">
529
                  <xsl:variable name="ref_id" select="references"/>
530
                  <xsl:variable name="references" select="$ids[@id=$ref_id]" />
531
                  <xsl:for-each select="$references">
532
                     <xsl:call-template name="choosedistribution"/>
533
                  </xsl:for-each>
534
               </xsl:when>
535
               <xsl:otherwise>
536
                  <xsl:call-template name="choosedistribution"/>
537
              </xsl:otherwise>
538
           </xsl:choose>
539
        </xsl:if>
540
      </xsl:for-each>
541
   </xsl:template>
542
   
543
   <xsl:template name="choosedistribution">
544
      <xsl:for-each select="distribution">
545
         <xsl:if test="$distributionindex=position()">
546
            <xsl:choose>
547
               <xsl:when test="references!=''">
548
                  <xsl:variable name="ref_id" select="references"/>
549
                  <xsl:variable name="references" select="$ids[@id=$ref_id]" />
550
                  <xsl:for-each select="$references">
551
                     <xsl:for-each select="inline">
552
                        <xsl:value-of select="."/>
553
                      </xsl:for-each>
554
                  </xsl:for-each>
555
               </xsl:when>
556
               <xsl:otherwise>
557
                  <xsl:for-each select="inline">
558
                    <xsl:value-of select="."/>
559
                  </xsl:for-each>
560
              </xsl:otherwise>
561
           </xsl:choose>
562
        </xsl:if>
563
      </xsl:for-each>
564
   </xsl:template>
565
   
566
   
567
     <!--********************************************************
568
                     Citation part
569
       ********************************************************-->
570
   <xsl:template name="emlcitation">
571
       
572
        <table class="tabledefault" width="100%">
573
        <tr>
574
          <td width="100%" colspan="2">
575
             <right>
576
               <h3>Citation Description</h3>
577
             </right>
578
          </td>
579
        </tr>
580
        <xsl:call-template name="identifier">
581
              <xsl:with-param name="packageID" select="../@packageId"/>
582
              <xsl:with-param name="system" select="../@system"/>
583
        </xsl:call-template>
584
        <tr>
585
          <td width="100%" colspan="2">
586
            <xsl:call-template name="citation">
587
               <xsl:with-param name="citationfirstColStyle" select="$firstColStyle"/>
588
               <xsl:with-param name="citationsubHeaderStyle" select="$subHeaderStyle"/>
589
           </xsl:call-template>
590
          </td>
591
        </tr>
592
     </table>
593
   </xsl:template>
594
   
595
   
596
      
597
     <!--********************************************************
598
                    Software part
599
       ********************************************************-->
600
   
601
   <xsl:template name="emlsoftware">
602
     <table class="tabledefault" width="100%">
603
        <tr>
604
          <td width="100%" colspan="2">
605
             <right>
606
               <h3>Software Description</h3>
607
             </right>
608
          </td>
609
        </tr>
610
        <xsl:call-template name="identifier">
611
              <xsl:with-param name="packageID" select="../@packageId"/>
612
              <xsl:with-param name="system" select="../@system"/>
613
        </xsl:call-template>
614
         <tr>
615
          <td width="100%" colspan="2">
616
            <xsl:call-template name="software">
617
               <xsl:with-param name="softwarefirstColStyle" select="$firstColStyle"/>
618
               <xsl:with-param name="softwaresubHeaderStyle" select="$subHeaderStyle"/>
619
           </xsl:call-template>
620
          </td>
621
        </tr>
622
     </table>
623
   </xsl:template>
624
   
625
     
626
     <!--********************************************************
627
                    Protocal part
628
       ********************************************************-->
629
   
630
   <xsl:template name="emlprotocol">
631
      <table class="tabledefault" width="100%">
632
        <tr>
633
          <td width="100%" colspan="2">
634
             <right>
635
               <h3>Protocal Description</h3>
636
             </right>
637
          </td>
638
        </tr>
639
        <xsl:call-template name="identifier">
640
              <xsl:with-param name="packageID" select="../@packageId"/>
641
              <xsl:with-param name="system" select="../@system"/>
642
        </xsl:call-template>
643
       <tr>
644
       <td width="100%" colspan="2">
645
            <xsl:call-template name="protocol">
646
               <xsl:with-param name="protocolfirstColStyle" select="$firstColStyle"/>
647
               <xsl:with-param name="protocolsubHeaderStyle" select="$subHeaderStyle"/>
648
           </xsl:call-template>
649
          </td>
650
        </tr>
651
     </table>
652
   </xsl:template>
653
   
654
      <!--********************************************************
655
                   additionalmetadata part
656
       ********************************************************-->
657
   <xsl:template name="additionalmetadataURL">
658
     <xsl:param name="index"/>
659
     <table class="default" width="100%">
660
       <tr><td width="100%" class="{$subHeaderStyle}">
661
              <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>
662
              <b>Additional Metadata</b></a>
663
           </td>
664
       </tr>
665
     </table>
666
   </xsl:template>
667
    
668
</xsl:stylesheet>