Project

General

Profile

« Previous | Next » 

Revision 5772

merge "shared" and "common" EML stylesheets into single "common" directory that is retrieved from the EML repository when Metacat is built

View differences:

lib/style/shared/eml-2/eml-coverage.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Matthew Brooke
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: cjones $'
10
  *     '$Date: 2006-11-17 13:37:07 -0800 (Fri, 17 Nov 2006) $'
11
  * '$Revision: 3094 $'
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-variable.dtd
29
  * module of the Ecological Metadata Language (EML) into an HTML format
30
  * suitable for rendering with modern web browsers.
31
-->
32

  
33
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
34
  <xsl:import href="eml-literature.xsl"/>
35

  
36
  <xsl:output method="html" encoding="iso-8859-1"
37
    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
38
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
39
    indent="yes" />  
40

  
41
  <!-- This module is for coverage and it is self contained(It is a table
42
       and will handle reference by it self)-->
43
  <xsl:template name="coverage">
44
        <xsl:choose>
45
         <xsl:when test="references!=''">
46
          <xsl:variable name="ref_id" select="references"/>
47
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
48
          <xsl:for-each select="$references">
49
          <table class="{$tabledefaultStyle}">
50
            <xsl:for-each select="geographicCoverage">
51
                <xsl:call-template name="geographicCoverage">
52
                </xsl:call-template>
53
            </xsl:for-each>
54
          </table>
55
          <table class="{$tabledefaultStyle}">
56
             <xsl:for-each select="temporalCoverage">
57
                <xsl:call-template name="temporalCoverage">
58
                </xsl:call-template>
59
            </xsl:for-each>
60
          </table>
61
          <table class="{$tabledefaultStyle}">
62
            <xsl:for-each select="taxonomicCoverage">
63
                <xsl:call-template name="taxonomicCoverage">
64
                </xsl:call-template>
65
            </xsl:for-each>
66
          </table>
67
          </xsl:for-each>
68
        </xsl:when>
69
        <xsl:otherwise>
70
          <table class="{$tabledefaultStyle}">
71
            <xsl:for-each select="geographicCoverage">
72
                <xsl:call-template name="geographicCoverage">
73
                </xsl:call-template>
74
            </xsl:for-each>
75
          </table>
76
          <table class="{$tabledefaultStyle}">
77
            <xsl:for-each select="temporalCoverage">
78
                <xsl:call-template name="temporalCoverage">
79
                </xsl:call-template>
80
            </xsl:for-each>
81
          </table>
82
          <table class="{$tabledefaultStyle}">
83
            <xsl:for-each select="taxonomicCoverage">
84
                <xsl:call-template name="taxonomicCoverage">
85
                </xsl:call-template>
86
            </xsl:for-each>
87
          </table>
88
        </xsl:otherwise>
89
      </xsl:choose>
90
  </xsl:template>
91

  
92
 <!-- ********************************************************************* -->
93
 <!-- **************  G E O G R A P H I C   C O V E R A G E  ************** -->
94
 <!-- ********************************************************************* -->
95
  <xsl:template name="geographicCoverage">
96
    <xsl:choose>
97
      <xsl:when test="references!=''">
98
        <xsl:variable name="ref_id" select="references"/>
99
        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
100
        <xsl:for-each select="$references">
101
          <xsl:for-each select="geographicCoverage">
102
            <table class="{$tabledefaultStyle}">
103
              <xsl:call-template name="geographicCovCommon" />
104
            </table>
105
          </xsl:for-each>
106
        </xsl:for-each>
107
      </xsl:when>
108
      <xsl:otherwise>
109
          <table class="{$tabledefaultStyle}">
110
            <xsl:call-template name="geographicCovCommon" />
111
          </table>
112
      </xsl:otherwise>
113
    </xsl:choose>
114
  </xsl:template>
115

  
116
  <xsl:template name="geographicCovCommon">
117
      <tr>
118
        <th colspan="2">
119
          <xsl:text>Geographic Region:</xsl:text>
120
        </th>
121
      </tr>
122
      <xsl:apply-templates select="geographicDescription"/>
123
      <xsl:apply-templates select="boundingCoordinates"/>
124
      <xsl:for-each select="datasetGPolygon">
125
          <xsl:if test="datasetGPolygonOuterGRing">
126
            <xsl:apply-templates select="datasetGPolygonOuterGRing"/>
127
          </xsl:if>
128
          <xsl:if test="datasetGPolygonExclusionGRing">
129
              <xsl:apply-templates select="datasetGPolygonExclusionGRing"/>
130
          </xsl:if>
131
     </xsl:for-each>
132
  </xsl:template>
133

  
134
  <xsl:template match="geographicDescription">
135
    <tr>
136
      <td class="{$firstColStyle}">Geographic Description:</td>
137
      <td class="{$secondColStyle}"><xsl:value-of select="."/></td>
138
    </tr>
139
  </xsl:template>
140

  
141
  <xsl:template match="boundingCoordinates">
142
      <tr><td class="{$firstColStyle}">
143
           Bounding Coordinates:
144
          </td>
145
       <td>
146
         <table>
147
           <xsl:apply-templates select="westBoundingCoordinate"/>
148
           <xsl:apply-templates select="eastBoundingCoordinate"/>
149
           <xsl:apply-templates select="northBoundingCoordinate"/>
150
           <xsl:apply-templates select="southBoundingCoordinate"/>
151
           <xsl:apply-templates select="boundingAltitudes"/>
152
         </table>
153
      </td>
154
      </tr>
155
  </xsl:template>
156

  
157
  <xsl:template match="westBoundingCoordinate">
158
    <tr><td class="{$firstColStyle}">
159
         <xsl:text>West: &#160;</xsl:text>
160
        </td>
161
        <td class="{$secondColStyle}">
162
         <xsl:value-of select="."/>&#160; degrees
163
        </td>
164
     </tr>
165
  </xsl:template>
166

  
167
  <xsl:template match="eastBoundingCoordinate">
168
    <tr><td class="{$firstColStyle}">
169
       <xsl:text>East: &#160;</xsl:text>
170
       </td>
171
       <td class="{$secondColStyle}">
172
         <xsl:value-of select="."/>&#160; degrees
173
       </td>
174
     </tr>
175
  </xsl:template>
176

  
177
  <xsl:template match="northBoundingCoordinate">
178
    <tr><td class="{$firstColStyle}">
179
         <xsl:text>North: &#160;</xsl:text>
180
        </td>
181
        <td class="{$secondColStyle}">
182
          <xsl:value-of select="."/>&#160; degrees
183
        </td>
184
     </tr>
185
  </xsl:template>
186

  
187
  <xsl:template match="southBoundingCoordinate">
188
    <tr><td class="{$firstColStyle}">
189
         <xsl:text>South: &#160;</xsl:text>
190
       </td>
191
       <td class="{$secondColStyle}">
192
         <xsl:value-of select="."/>&#160; degrees
193
        </td>
194
    </tr>
195
  </xsl:template>
196

  
197

  
198
  <xsl:template match="boundingAltitudes">
199

  
200
      <tr><td class="{$firstColStyle}">
201
        Mimimum Altitude:</td><td class="{$secondColStyle}">
202
        <xsl:apply-templates select="altitudeMinimum"/></td></tr>
203
      <tr><td class="{$firstColStyle}">
204
        Maximum Altitude:</td><td class="{$secondColStyle}">
205
        <xsl:apply-templates select="altitudeMaximum"/></td></tr>
206

  
207
  </xsl:template>
208

  
209
  <xsl:template match="altitudeMinimum">
210
     <xsl:value-of select="."/> &#160;<xsl:value-of select="../altitudeUnits"/>
211
  </xsl:template>
212

  
213
  <xsl:template match="altitudeMaximum">
214
    <xsl:value-of select="."/> &#160;<xsl:value-of select="../altitudeUnits"/>
215
  </xsl:template>
216

  
217
  <xsl:template match="datasetGPolygonOuterGRing">
218
    <tr><td class="{$firstColStyle}">
219
          <xsl:text>G-Ploygon(Outer Ring): </xsl:text>
220
        </td>
221
        <td class="{$secondColStyle}">
222
           <xsl:apply-templates select="gRingPoint"/>
223
           <xsl:apply-templates select="gRing"/>
224
        </td>
225
     </tr>
226
  </xsl:template>
227

  
228
  <xsl:template match="datasetGPolygonExclusionGRing">
229
    <tr><td class="{$firstColStyle}">
230
          <xsl:text>G-Ploygon(Exclusion Ring): </xsl:text>
231
        </td>
232
        <td class="{$secondColStyle}">
233
           <xsl:apply-templates select="gRingPoint"/>
234
           <xsl:apply-templates select="gRing"/>
235
        </td>
236
     </tr>
237
  </xsl:template>
238

  
239
  <xsl:template match="gRing">
240
    <xsl:text>(GRing) &#160;</xsl:text>
241
    <xsl:text>Latitude: </xsl:text>
242
    <xsl:value-of select="gRingLatitude"/>,
243
    <xsl:text>Longitude: </xsl:text>
244
    <xsl:value-of select="gRingLongitude"/><br/>
245
  </xsl:template>
246

  
247
  <xsl:template match="gRingPoint">
248
    <xsl:text>Latitude: </xsl:text>
249
    <xsl:value-of select="gRingLatitude"/>,
250
    <xsl:text>Longitude: </xsl:text>
251
    <xsl:value-of select="gRingLongitude"/><br/>
252
  </xsl:template>
253

  
254
<!-- ********************************************************************* -->
255
<!-- ****************  T E M P O R A L   C O V E R A G E  **************** -->
256
<!-- ********************************************************************* -->
257

  
258
  <xsl:template name="temporalCoverage">
259
    <xsl:choose>
260
      <xsl:when test="references!=''">
261
        <xsl:variable name="ref_id" select="references"/>
262
        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
263
        <xsl:for-each select="$references">
264
          <table class="{$tabledefaultStyle}">
265
            <xsl:call-template name="temporalCovCommon" />
266
          </table>
267
        </xsl:for-each>
268
      </xsl:when>
269
      <xsl:otherwise>
270
          <table class="{$tabledefaultStyle}">
271
            <xsl:call-template name="temporalCovCommon" />
272
          </table>
273
      </xsl:otherwise>
274
    </xsl:choose>
275
  </xsl:template>
276

  
277
  <xsl:template name="temporalCovCommon" >
278
     <tr><th colspan="2">
279
      <xsl:text>Time Period:</xsl:text></th></tr>
280
      <xsl:apply-templates select="singleDateTime"/>
281
      <xsl:apply-templates select="rangeOfDates"/>
282
  </xsl:template>
283

  
284
  <xsl:template match="singleDateTime">
285
    <tr><td class="{$firstColStyle}">
286
            Date:
287
         </td>
288
         <td>
289
             <xsl:call-template name="singleDateType" />
290
         </td>
291
     </tr>
292
   </xsl:template>
293

  
294
  <xsl:template match="rangeOfDates">
295
     <tr><td class="{$firstColStyle}">
296
            Begin:
297
         </td>
298
         <td>
299
            <xsl:apply-templates select="beginDate"/>
300
          </td>
301
     </tr>
302

  
303
     <tr><td class="{$firstColStyle}">
304
            End:
305
          </td>
306
          <td>
307
             <xsl:apply-templates select="endDate"/>
308
          </td>
309
     </tr>
310
  </xsl:template>
311

  
312

  
313
  <xsl:template match="beginDate">
314
      <xsl:call-template name="singleDateType"/>
315
  </xsl:template>
316

  
317
  <xsl:template match="endDate">
318
      <xsl:call-template name="singleDateType"/>
319
  </xsl:template>
320

  
321
  <xsl:template name="singleDateType">
322
    <table>
323
     <xsl:if test="calendarDate">
324
      <tr>
325
       <td colspan="2" class="{$secondColStyle}">
326
          <xsl:value-of select="calendarDate"/>
327
          <xsl:if test="./time and normalize-space(./time)!=''">
328
            <xsl:text>&#160; at &#160;</xsl:text><xsl:apply-templates select="time"/>
329
          </xsl:if>
330
        </td>
331
      </tr>
332
     </xsl:if>
333
     <xsl:if test="alternativeTimeScale">
334
         <xsl:apply-templates select="alternativeTimeScale"/>
335
     </xsl:if>
336
    </table>
337
  </xsl:template>
338

  
339

  
340
  <xsl:template match="alternativeTimeScale">
341

  
342
        <tr><td class="{$firstColStyle}">
343
            Timescale:</td><td class="{$secondColStyle}"><xsl:value-of select="timeScaleName"/></td></tr>
344
        <tr><td class="{$firstColStyle}">
345
            Time estimate:</td><td class="{$secondColStyle}"><xsl:value-of select="timeScaleAgeEstimate"/></td></tr>
346
        <xsl:if test="timeScaleAgeUncertainty and normalize-space(timeScaleAgeUncertainty)!=''">
347
        <tr><td class="{$firstColStyle}">
348
            Time uncertainty:</td><td class="{$secondColStyle}"><xsl:value-of select="timeScaleAgeUncertainty"/></td></tr>
349
        </xsl:if>
350
        <xsl:if test="timeScaleAgeExplanation and normalize-space(timeScaleAgeExplanation)!=''">
351
        <tr><td class="{$firstColStyle}">
352
            Time explanation:</td><td class="{$secondColStyle}"><xsl:value-of select="timeScaleAgeExplanation"/></td></tr>
353
        </xsl:if>
354
        <xsl:if test="timeScaleCitation and normalize-space(timeScaleCitation)!=''">
355
        <tr><td class="{$firstColStyle}">
356
            Citation:</td><td class="{$secondColStyle}">
357
            <xsl:apply-templates select="timeScaleCitation"/>
358
        </td></tr>
359
        </xsl:if>
360

  
361
  </xsl:template>
362

  
363
  <xsl:template match="timeScaleCitation">
364
     <!-- Using citation module here -->
365
     <xsl:call-template name="citation">
366
     </xsl:call-template>
367
  </xsl:template>
368

  
369
<!-- ********************************************************************* -->
370
<!-- ***************  T A X O N O M I C   C O V E R A G E  *************** -->
371
<!-- ********************************************************************* -->
372
  <xsl:template name="taxonomicCoverage">
373
     <xsl:choose>
374
      <xsl:when test="references!=''">
375
        <xsl:variable name="ref_id" select="references"/>
376
        <xsl:variable name="references" select="$ids[@id=$ref_id]" />
377
        <xsl:for-each select="$references">
378
          <table class="{$tabledefaultStyle}">
379
            <xsl:call-template name="taxonomicCovCommon" />
380
          </table>
381
        </xsl:for-each>
382
      </xsl:when>
383
      <xsl:otherwise>
384
        <table class="{$tabledefaultStyle}">
385
          <xsl:call-template name="taxonomicCovCommon" />
386
        </table>
387
      </xsl:otherwise>
388
    </xsl:choose>
389
  </xsl:template>
390

  
391

  
392
  <xsl:template name="taxonomicCovCommon">
393
      <tr><th colspan="2">
394
      <xsl:text>Taxonomic Range:</xsl:text></th></tr>
395
      <xsl:apply-templates select="taxonomicSystem"/>
396
      <xsl:apply-templates select="generalTaxonomicCoverage"/>
397
      <xsl:for-each select="taxonomicClassification">
398
          <xsl:apply-templates select="."/>
399
      </xsl:for-each>
400
  </xsl:template>
401

  
402

  
403
 <xsl:template match="taxonomicSystem">
404
     <tr><td class="{$firstColStyle}">
405
        <xsl:text>Taxonomic System:</xsl:text></td>
406
        <td>
407
            <table class="{$tabledefaultStyle}">
408
              <xsl:apply-templates select="./*"/>
409
            </table>
410
        </td>
411
     </tr>
412
  </xsl:template>
413

  
414

  
415
  <xsl:template match="classificationSystem">
416
     <xsl:for-each select="classificationSystemCitation">
417
        <tr><td class="{$firstColStyle}">Classification Citation:</td>
418
          <td>
419
           <xsl:call-template name="citation">
420
             <xsl:with-param name="citationfirstColStyle" select="$firstColStyle"/>
421
             <xsl:with-param name="citationsubHeaderStyle" select="$subHeaderStyle"/>
422
           </xsl:call-template>
423
         </td>
424
        </tr>
425
     </xsl:for-each>
426
     <xsl:if test="classificationSystemModifications and normalize-space(classificationSystemModifications)!=''">
427
      <tr><td class="{$firstColStyle}">Modification:</td>
428
        <td class="{$secondColStyle}">
429
          <xsl:value-of select="classificationSystemModifications"/>
430
        </td>
431
      </tr>
432
     </xsl:if>
433
  </xsl:template>
434

  
435

  
436
  <xsl:template match="identificationReference">
437
      <tr><td class="{$firstColStyle}">ID Reference:</td>
438
          <td>
439
             <xsl:call-template name="citation">
440
                <xsl:with-param name="citationfirstColStyle" select="$firstColStyle"/>
441
                <xsl:with-param name="citationsubHeaderStyle" select="$subHeaderStyle"/>
442
             </xsl:call-template>
443
          </td>
444
     </tr>
445
  </xsl:template>
446

  
447
  <xsl:template match="identifierName">
448
      <tr><td class="{$firstColStyle}">ID Name:</td>
449
          <td>
450
             <xsl:call-template name="party">
451
               <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
452
             </xsl:call-template>
453
          </td>
454
      </tr>
455
  </xsl:template>
456

  
457
  <xsl:template match="taxonomicProcedures">
458
    <tr><td class="{$firstColStyle}">
459
        <xsl:text>Procedures:</xsl:text></td><td class="{$secondColStyle}">
460
        <xsl:value-of select="."/></td></tr>
461
  </xsl:template>
462

  
463
  <xsl:template match="taxonomicCompleteness">
464
    <tr><td class="{$firstColStyle}">
465
        <xsl:text>Completeness:</xsl:text></td><td class="{$secondColStyle}">
466
        <xsl:value-of select="."/></td></tr>
467
  </xsl:template>
468

  
469
  <xsl:template match="vouchers">
470
      <tr><td class="{$firstColStyle}">Vouchers:</td>
471
        <td>
472
        <table class="{$tabledefaultStyle}">
473
        <xsl:apply-templates select="specimen"/>
474
        <xsl:apply-templates select="repository"/>
475
        </table>
476
        </td></tr>
477
  </xsl:template>
478

  
479
  <xsl:template match="specimen">
480
    <tr><td class="{$firstColStyle}">
481
        <xsl:text>Specimen:</xsl:text></td><td class="{$secondColStyle}">
482
        <xsl:value-of select="."/></td></tr>
483
  </xsl:template>
484

  
485
  <xsl:template match="repository">
486
    <tr><td class="{$firstColStyle}">Repository:</td>
487
        <td>
488
            <xsl:for-each select="originator">
489
               <xsl:call-template name="party">
490
                 <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
491
               </xsl:call-template>
492
            </xsl:for-each>
493
        </td>
494
    </tr>
495
  </xsl:template>
496

  
497

  
498
  <xsl:template match="generalTaxonomicCoverage">
499
      <tr><td class="{$firstColStyle}">
500
             <xsl:text>General Coverage:</xsl:text></td>
501
           <td class="{$secondColStyle}">
502
             <xsl:value-of select="."/>
503
          </td>
504
      </tr>
505
  </xsl:template>
506

  
507

  
508
  <xsl:template match="taxonomicClassification">
509
    <tr><td class="{$firstColStyle}">
510
        <xsl:text>Classification:</xsl:text></td><td>
511
        <table class="{$tabledefaultStyle}">
512
        <xsl:apply-templates select="./*" mode="nest"/>
513
        </table>
514
        </td></tr>
515
  </xsl:template>
516

  
517
  <xsl:template match="taxonRankName" mode="nest" >
518
      <tr><td class="{$firstColStyle}">
519
        <xsl:text>Rank Name:</xsl:text></td><td class="{$secondColStyle}">
520
        <xsl:value-of select="."/></td></tr>
521
  </xsl:template>
522

  
523
  <xsl:template match="taxonRankValue" mode="nest">
524
      <tr><td class="{$firstColStyle}">
525
        <xsl:text>Rank Value:</xsl:text></td><td class="{$secondColStyle}">
526
        <xsl:value-of select="."/></td></tr>
527
  </xsl:template>
528

  
529
  <xsl:template match="commonName" mode="nest">
530
      <tr><td class="{$firstColStyle}">
531
            <xsl:text>Common Name:</xsl:text></td><td class="{$secondColStyle}">
532
            <xsl:value-of select="."/>
533
          </td>
534
      </tr>
535
  </xsl:template>
536

  
537
  <xsl:template match="taxonomicClassification" mode="nest">
538
    <tr><td class="{$firstColStyle}">
539
          <xsl:text>Classification:</xsl:text>
540
        </td>
541
        <td>
542
           <table class="{$tabledefaultStyle}">
543
             <xsl:apply-templates select="./*" mode="nest"/>
544
           </table>
545
        </td>
546
     </tr>
547
  </xsl:template>
548

  
549
</xsl:stylesheet>
550 0

  
lib/style/shared/eml-2/eml-party.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Matthew Brooke
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: cjones $'
10
  *     '$Date: 2006-11-17 13:37:07 -0800 (Fri, 17 Nov 2006) $'
11
  * '$Revision: 3094 $'
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-variable.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

  
34
  <xsl:output method="html" encoding="iso-8859-1"
35
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
36
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
37
              indent="yes" />  
38

  
39
  <!-- This module is for party member and it is self contained-->
40

  
41
  <xsl:template name="party">
42
      <xsl:param name="partyfirstColStyle"/>
43
      <table class="{$tabledefaultStyle}">
44
        <xsl:choose>
45
         <xsl:when test="references!=''">
46
          <xsl:variable name="ref_id" select="references"/>
47
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
48
          <xsl:for-each select="$references">
49
            <xsl:apply-templates mode="party">
50
             <xsl:with-param name="partyfirstColStyle" select="$partyfirstColStyle"/>
51
            </xsl:apply-templates>
52
          </xsl:for-each>
53
        </xsl:when>
54
        <xsl:otherwise>
55
          <xsl:apply-templates mode="party">
56
            <xsl:with-param name="partyfirstColStyle" select="$partyfirstColStyle"/>
57
          </xsl:apply-templates>
58
        </xsl:otherwise>
59
      </xsl:choose>
60
      </table>
61
  </xsl:template>
62

  
63
  <!-- *********************************************************************** -->
64

  
65

  
66
  <xsl:template match="individualName" mode="party">
67
      <xsl:param name="partyfirstColStyle"/>
68
      <xsl:if test="normalize-space(.)!=''">
69
        <tr><td class="{$partyfirstColStyle}" >
70
            Individual:</td><td class="{$secondColStyle}" >
71
           <b><xsl:value-of select="./salutation"/><xsl:text> </xsl:text>
72
           <xsl:value-of select="./givenName"/><xsl:text> </xsl:text>
73
           <xsl:value-of select="./surName"/></b>
74
        </td></tr>
75
      </xsl:if>
76
  </xsl:template>
77

  
78

  
79
  <xsl:template match="organizationName" mode="party">
80
      <xsl:param name="partyfirstColStyle"/>
81
      <xsl:if test="normalize-space(.)!=''">
82
        <tr><td class="{$partyfirstColStyle}" >
83
        Organization:</td><td class="{$secondColStyle}">
84
        <b><xsl:value-of select="."/></b>
85
        </td></tr>
86
      </xsl:if>
87
  </xsl:template>
88

  
89

  
90
  <xsl:template match="positionName" mode="party">
91
      <xsl:param name="partyfirstColStyle"/>
92
      <xsl:if test="normalize-space(.)!=''">
93
      <tr><td class="{$partyfirstColStyle}">
94
        Position:</td><td class="{$secondColStyle}">
95
        <xsl:value-of select="."/></td></tr>
96
      </xsl:if>
97
  </xsl:template>
98

  
99

  
100
  <xsl:template match="address" mode="party">
101
    <xsl:param name="partyfirstColStyle"/>
102
    <xsl:if test="normalize-space(.)!=''">
103
      <xsl:call-template name="addressCommon">
104
         <xsl:with-param name="partyfirstColStyle" select="$partyfirstColStyle"/>
105
      </xsl:call-template>
106
    </xsl:if>
107
    </xsl:template>
108

  
109
   <!-- This template will be call by other place-->
110
   <xsl:template name="address">
111
      <xsl:param name="partyfirstColStyle"/>
112
      <table class="{$tablepartyStyle}">
113
        <xsl:choose>
114
         <xsl:when test="references!=''">
115
          <xsl:variable name="ref_id" select="references"/>
116
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
117
          <xsl:for-each select="$references">
118
            <xsl:call-template name="addressCommon">
119
             <xsl:with-param name="partyfirstColStyle" select="$partyfirstColStyle"/>
120
            </xsl:call-template>
121
          </xsl:for-each>
122
        </xsl:when>
123
        <xsl:otherwise>
124
          <xsl:call-template name="addressCommon">
125
             <xsl:with-param name="partyfirstColStyle" select="$partyfirstColStyle"/>
126
          </xsl:call-template>
127
        </xsl:otherwise>
128
      </xsl:choose>
129
      </table>
130
  </xsl:template>
131

  
132
   <xsl:template name="addressCommon">
133
    <xsl:param name="partyfirstColStyle"/>
134
    <xsl:if test="normalize-space(.)!=''">
135
    <tr><td class="{$partyfirstColStyle}">
136
        Address:</td><td>
137
    <table class="{$tablepartyStyle}">
138
    <xsl:for-each select="deliveryPoint">
139
    <tr><td class="{$secondColStyle}"><xsl:value-of select="."/><xsl:text>, </xsl:text></td></tr>
140
    </xsl:for-each>
141
    <!-- only include comma if city exists... -->
142
    <tr><td class="{$secondColStyle}" >
143
    <xsl:if test="normalize-space(city)!=''">
144
        <xsl:value-of select="city"/><xsl:text>, </xsl:text>
145
    </xsl:if>
146
    <xsl:if test="normalize-space(administrativeArea)!='' or normalize-space(postalCode)!=''">
147
        <xsl:value-of select="administrativeArea"/><xsl:text> </xsl:text><xsl:value-of select="postalCode"/><xsl:text> </xsl:text>
148
    </xsl:if>
149
    <xsl:if test="normalize-space(country)!=''">
150
      <xsl:value-of select="country"/>
151
    </xsl:if></td></tr>
152
    </table></td></tr>
153
    </xsl:if>
154
   </xsl:template>
155

  
156
  <xsl:template match="phone" mode="party">
157
      <xsl:param name="partyfirstColStyle"/>
158
      <tr><td class="{$partyfirstColStyle}" >
159
             Phone:
160
          </td>
161
          <td>
162
            <table class="{$tablepartyStyle}">
163
              <tr><td class="{$secondColStyle}">
164
                     <xsl:value-of select="."/>
165
                     <xsl:if test="normalize-space(./@phonetype)!=''">
166
                       <xsl:text> (</xsl:text><xsl:value-of select="./@phonetype"/><xsl:text>)</xsl:text>
167
                     </xsl:if>
168
                   </td>
169
               </tr>
170
             </table>
171
          </td>
172
      </tr>
173
  </xsl:template>
174

  
175

  
176
  <xsl:template match="electronicMailAddress" mode="party">
177
      <xsl:param name="partyfirstColStyle"/>
178
      <xsl:if test="normalize-space(.)!=''">
179
       <tr><td class="{$partyfirstColStyle}" >
180
            Email Address:
181
          </td>
182
          <td>
183
            <table class="{$tablepartyStyle}">
184
              <tr><td class="{$secondColStyle}">
185
                    <a><xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute><xsl:value-of select="./entityName"/>
186
                    <xsl:value-of select="."/></a>
187
                   </td>
188
              </tr>
189
            </table>
190
          </td>
191
        </tr>
192
      </xsl:if>
193
  </xsl:template>
194

  
195

  
196
  <xsl:template match="onlineUrl" mode="party">
197
      <xsl:param name="partyfirstColStyle"/>
198
      <xsl:if test="normalize-space(.)!=''">
199
      <tr><td class="{$partyfirstColStyle}" >
200
            Web Address:
201
          </td>
202
          <td>
203
             <table class="{$tablepartyStyle}">
204
               <tr><td class="{$secondColStyle}">
205
                     <a><xsl:attribute name="href">http://<xsl:value-of select="."/></xsl:attribute><xsl:value-of select="./entityName"/>
206
                     <xsl:value-of select="."/></a>
207
                    </td>
208
               </tr>
209
             </table>
210
           </td>
211
        </tr>
212
      </xsl:if>
213
  </xsl:template>
214

  
215

  
216
  <xsl:template match="userId" mode="party">
217
      <xsl:param name="partyfirstColStyle"/>
218
      <xsl:if test="normalize-space(.)!=''">
219
      <tr><td class="{$partyfirstColStyle}" >
220
        Id:</td><td class="{$secondColStyle}">
221
        <xsl:value-of select="."/></td></tr>
222
      </xsl:if>
223
  </xsl:template>
224
  <xsl:template match="text()" mode="party" />
225
</xsl:stylesheet>
226 0

  
lib/style/shared/eml-2/eml-settings.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Matthew Brooke
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: barteau $'
10
  *     '$Date: 2008-01-15 17:12:44 -0800 (Tue, 15 Jan 2008) $'
11
  * '$Revision: 3689 $'
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
  *****************************************************************************
28
  *
29
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet that provides a
30
  * single, central location for setting all installation-specific paths for
31
  * XSLT stylesheets.  It is intended to be imported (using the
32
  * <xsl:import href="..." /> element) into other XSLT stylesheets used in the
33
  * transformation of xml files that are valid with respect to the
34
  * applicable dtd of the Ecological Metadata Language (EML).
35

  
36
  * Some of these paths incorporate values of the form: @token-name@; these are
37
  * intended to allow an Ant (http://jakarta.apache.org/ant/index.html) build
38
  * script to replace the tokens automatically with the correct values at build/
39
  * install time.  If Ant is not used, the tokens may simply be edited by hand
40
  * to point to the correct resources.
41
  * Note that the values given below may be overridden by passing parameters to
42
  * the XSLT processor programatically, although the procedure for doing so is
43
  * vendor-specific.  Note also that these parameter definitions will be overridden
44
  * by any identical parameter names declared within xsl stylesheets that import
45
  * this stylesheet.
46
  *
47
-->
48

  
49
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
50

  
51

  
52
<!--
53
    /**
54
    *   The filename of the default css stylesheet to be used
55
    *   (filename only - not the whole path, and no ".css" extension.  The
56
    *   example below would look for a file named "default.css" in the same
57
    *   directory as the stylesheets
58
    */
59
-->
60

  
61
  <xsl:param name="qformat">default</xsl:param>
62

  
63

  
64
<!--
65
    /**
66
    *   The module which need to be display in eml2 document. The default
67
    *   value is dataset
68
    */
69
-->
70
  <xsl:param name="displaymodule">dataset</xsl:param>
71

  
72

  
73
<!--
74
    /**
75
    *   To show the links for the Entities in the dataset display module.
76
    */
77
-->
78
  <xsl:param name="withEntityLinks">1</xsl:param>
79

  
80

  
81
<!--
82
    /**
83
    *   To show the link for Additional Metadata in the dataset display module.
84
    */
85
-->
86
  <xsl:param name="withAdditionalMetadataLink">1</xsl:param>
87

  
88

  
89
<!--
90
    /**
91
    *   To show the link for the Original XML in the dataset display module.
92
    */
93
-->
94
  <xsl:param name="withOriginalXMLLink">1</xsl:param>
95

  
96

  
97
<!--
98
    /**
99
    *   To show any html links (emails and webpage).
100
    */
101
-->
102
  <xsl:param name="withHTMLLinks">1</xsl:param>
103

  
104
<!--
105
    /**
106
    *   To show the Attributes table in the entity display.
107
    */
108
-->
109
  <xsl:param name="withAttributes">1</xsl:param>
110

  
111
<!--
112
    /**
113
    *   To insert templates where header and footer are defined.
114
    */
115
-->
116
  <xsl:param name="insertTemplate">1</xsl:param>
117

  
118

  
119
<!--
120
   /**
121
    *   the path of the directory where the XSL and CSS files reside - starts
122
    *   with context name, eg: /myContextRoot/styleDirectory.
123
    *   (As found in "http://hostname:port/myContextRoot/styleDirectory").
124
    *   Needs leading slash but not trailing slash
125
    *
126
    *   EXAMPLE:
127
    *       <xsl:param name="stylePath">/brooke/style</xsl:param>
128
    */
129
-->
130

  
131
    <xsl:param name="stylePath">{$contextURL}/style/skins</xsl:param>
132

  
133

  
134
<!--
135
   /*
136
    *   the path of the directory where the common javascript and css files
137
    *   reside - i.e the files that are not skin-specific. Starts
138
    *   with context name, eg: /myContextRoot/styleCommonDirectory.
139
    *   (As found in "http://hostname:port/myContextRoot/styleCommonDirectory").
140
    *
141
    *   EXAMPLE
142
    *       <xsl:param name="styleCommonPath">/brooke/style/common</xsl:param>
143
    */
144
-->
145

  
146
    <xsl:param name="styleCommonPath">{$contextURL}/style/common</xsl:param>
147

  
148
<!--the docid of xml which is processed-->
149
    <xsl:param name="docid"/>
150
<!-- type of entity, data table or spacial raster or others-->
151
    <xsl:param name="entitytype"></xsl:param>
152
<!-- the index of entity in same entity type -->
153
    <xsl:param name="entityindex"/>
154
<!-- the index of attribute in same entity -->
155
    <xsl:param name="attributeindex"/>
156
<!-- the index of physical part in entity part-->
157
    <xsl:param name="physicalindex"/>
158
<!-- the index of distribution in physical part  -->
159
    <xsl:param name="distributionindex"/>
160
<!-- the levle of distribution -->
161
    <xsl:param name="distributionlevel"/>
162
<!-- the index of additional metadata-->
163
    <xsl:param name="additionalmetadataindex">1</xsl:param>
164
<!-- attribute set to get rid of cell spacing-->
165
    <xsl:attribute-set name="cellspacing">
166
      <xsl:attribute name="cellpadding">0</xsl:attribute>
167
      <xsl:attribute name="cellspacing">0</xsl:attribute>
168
    </xsl:attribute-set>
169

  
170
<!-- determines whether to use metacat or LSID identiers-->
171
	<xsl:param name="lsidauthority"></xsl:param>
172
<!-- the url for the data registry of the dataset-->
173
	<xsl:param name="registryurl"></xsl:param>
174
<!-- the name of the data registry of the dataset-->
175
	<xsl:param name="registryname"></xsl:param>
176

  
177
  
178
<!-- for getting the server context and cgi locations -->  
179
  <xsl:param name="contextURL"/>
180
  <xsl:param name="cgi-prefix"/>
181
  
182
<!-- for access to "protected" documents/files -->  
183
  <xsl:param name="sessionid"/>
184
  
185
  
186
<!--
187
    /**
188
    *   The base URI to be used for the href link to each document in a
189
    *   "subject-relationaship-object" triple
190
    *
191
    *   EXAMPLE:
192
    *       <xsl:param name="tripleURI">
193
    *         <![CDATA[/brooke/servlet/metacat?action=read&qformat=knb&docid=]]>
194
    *       </xsl:param>
195
    *
196
    *   (Note in the above case the "qformat=knb" parameter in the url; a system
197
    *   could pass this parameter to the XSLT engine to override the local
198
    *   <xsl:param name="qformat"> tags defined earlier in this document.)
199
    */
200
-->
201

  
202
  <xsl:param name="tripleURI"><xsl:value-of select="$contextURL" /><![CDATA[/metacat?action=read&qformat=]]><xsl:value-of select="$qformat" /><![CDATA[&sessionid=]]><xsl:value-of select="$sessionid" /><![CDATA[&docid=]]></xsl:param>
203

  
204
    <!-- URL for xmlformat-->
205
    <xsl:param name="xmlURI"><xsl:value-of select="$contextURL" /><![CDATA[/metacat?action=read&qformat=xml&docid=]]></xsl:param>
206

  
207

  
208
<!--
209
    /**
210
    *   Most of the html pages are currently laid out as a 2-column table, with
211
    *   highlights for more-major rows containing subsection titles etc.
212
    *   The following parameters are used within the
213
    *           <td width="whateverWidth" class="whateverClass">
214
    *   tags to define the column widths and (css) styles.
215
    *
216
    *   The values of the "xxxColWidth" parameters can be percentages (need to
217
    *   include % sign) or pixels (number only). Note that if a width is defined
218
    *   in the CSS stylesheet (see next paragraph), it will override this local
219
    *   width setting in browsers newer than NN4
220
    *
221
    *   The values of the "xxxColStyle" parameters refer to style definitions
222
    *   listed in the *.css stylesheet that is defined in this xsl document,
223
    *   above (in the <xsl:param name="qformat"> tag).
224
    *
225
    *   (Note that if the "qformat" is changed from the default by passing a
226
    *   value in the url (see notes for <xsl:param name="qformat"> tag, above),
227
    *   then the params below must match style names in the "new" CSS stylesheet
228
    */
229
-->
230

  
231
<!--    the style for major rows containing subsection titles etc. -->
232
  <xsl:param name="subHeaderStyle" select="'tablehead'"/>
233

  
234
<!--    the style for major rows containing links, such as additional metadata,
235
        original xml file etc. -->
236
  <xsl:param name="linkedHeaderStyle" select="'linkedHeaderStyle'"/>
237

  
238
<!--    the width for the first column (but see note above) -->
239
  <xsl:param name="firstColWidth" select="'15%'"/>
240

  
241
<!-- the style for the first column -->
242
  <xsl:param name="firstColStyle" select="'rowodd'"/>
243

  
244
<!--    the width for the second column (but see note above) -->
245
  <xsl:param name="secondColWidth" select="'85%'"/>
246

  
247
<!-- the style for the second column -->
248
  <xsl:param name="secondColStyle" select="'roweven'"/>
249

  
250
<!-- the style for the attribute table -->
251
  <xsl:param name="tableattributeStyle" select="'tableattribute'"/>
252

  
253
<!-- the style for the border -->
254
  <xsl:param name="borderStyle" select="'bordered'"/>
255

  
256
<!-- the style for the even col in attributes table -->
257
  <xsl:param name="colevenStyle" select="'coleven'"/>
258

  
259
<!-- the style for the inner even col in attributes table -->
260
  <xsl:param name="innercolevenStyle" select="'innercoleven'"/>
261

  
262
<!-- the style for the odd col in attributes table -->
263
  <xsl:param name="coloddStyle" select="'colodd'"/>
264

  
265
<!-- the style for the inner odd col in attributes table -->
266
  <xsl:param name="innercoloddStyle" select="'innercolodd'"/>
267

  
268

  
269
<!-- the default alignment style for the wrapper around the main tables -->
270
  <!--
271
  <xsl:param name="mainTableAligmentStyle" select="'mainTableAligmentStyle'"/>
272
  -->
273
  <xsl:param name="mainTableAligmentStyle" select="'content'"/>
274

  
275
<!-- the default style for the main container table -->
276
  <xsl:param name="mainContainerTableStyle" select="'group group_border'"/>
277

  
278
<!-- the default style for all other tables -->
279
  <xsl:param name="tabledefaultStyle" select="'subGroup subGroup_border onehundred_percent'"/>
280

  
281
<!-- the style for table party -->
282
  <xsl:param name="tablepartyStyle" select="'tableparty'"/>
283

  
284
<!-- Some html pages use a nested table in the second column.
285
     Some of these nested tables set their first column to
286
     the following width: -->
287
  <xsl:param name="secondColIndent" select="'10%'"/>
288

  
289
<!-- the first column width of attribute table-->
290
  <xsl:param name="attributefirstColWidth" select="'15%'"/>
291

  
292
</xsl:stylesheet>
293 0

  
lib/style/shared/eml-2/eml-protocol.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Matthew Brooke
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: cjones $'
10
  *     '$Date: 2006-11-17 13:37:07 -0800 (Fri, 17 Nov 2006) $'
11
  * '$Revision: 3094 $'
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-variable.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

  
34
  <xsl:output method="html" encoding="iso-8859-1"
35
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
36
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
37
              indent="yes" />  
38

  
39

  
40

  
41
  <xsl:template name="protocol">
42
    <xsl:param name="protocolfirstColStyle"/>
43
    <xsl:param name="protocolsubHeaderStyle"/>
44
    <table class="{$tabledefaultStyle}">
45
        <xsl:choose>
46
         <xsl:when test="references!=''">
47
          <xsl:variable name="ref_id" select="references"/>
48
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
49
          <xsl:for-each select="$references">
50
            <xsl:call-template name="protocolcommon">
51
              <xsl:with-param name="protocolfirstColStyle" select="$protocolfirstColStyle"/>
52
              <xsl:with-param name="protocolsubHeaderStyle" select="$protocolsubHeaderStyle"/>
53
            </xsl:call-template>
54
          </xsl:for-each>
55
        </xsl:when>
56
        <xsl:otherwise>
57
           <xsl:call-template name="protocolcommon">
58
              <xsl:with-param name="protocolfirstColStyle" select="$protocolfirstColStyle"/>
59
              <xsl:with-param name="protocolsubHeaderStyle" select="$protocolsubHeaderStyle"/>
60
           </xsl:call-template>
61
        </xsl:otherwise>
62
      </xsl:choose>
63
    </table>
64
  </xsl:template>
65

  
66
   <xsl:template name="protocolcommon">
67
        <xsl:param name="protocolfirstColStyle"/>
68
        <xsl:param name="protocolsubHeaderStyle"/>
69
        <xsl:call-template name="resource">
70
           <xsl:with-param name="resfirstColStyle" select="$protocolfirstColStyle"/>
71
           <xsl:with-param name="ressubHeaderStyle" select="$protocolsubHeaderStyle"/>
72
           <xsl:with-param name="creator">Author(s):</xsl:with-param>
73
        </xsl:call-template>
74
        <xsl:for-each select="proceduralStep">
75
          <tr><td colspan="2" class="{$protocolsubHeaderStyle}">
76
              Step<xsl:text> </xsl:text><xsl:value-of select="position()"/>:
77
              </td>
78
          </tr>
79
          <xsl:call-template name="step">
80
              <xsl:with-param name="protocolfirstColStyle" select="$protocolfirstColStyle"/>
81
              <xsl:with-param name="protocolsubHeaderStyle" select="$protocolsubHeaderStyle"/>
82
          </xsl:call-template>
83
        </xsl:for-each>
84
        <xsl:call-template name="protocolAccess">
85
              <xsl:with-param name="protocolfirstColStyle" select="$protocolfirstColStyle"/>
86
              <xsl:with-param name="protocolsubHeaderStyle" select="$protocolsubHeaderStyle"/>
87
        </xsl:call-template>
88
  </xsl:template>
89

  
90
  <xsl:template name="step">
91
    <xsl:param name="protocolfirstColStyle"/>
92
    <xsl:param name="protocolsubHeaderStyle"/>
93
    <xsl:for-each select="description">
94
      <tr><td class="{$protocolfirstColStyle}">
95
          Description:
96
          </td>
97
          <td>
98
             <xsl:call-template name="text">
99
               <xsl:with-param name="textfirstColStyle" select="$protocolfirstColStyle"/>
100
             </xsl:call-template>
101
          </td>
102
      </tr>
103
     </xsl:for-each>
104
    <xsl:for-each select="citation">
105
      <tr><td class="{$protocolfirstColStyle}">
106
          Citation:
107
          </td>
108
          <td class="{$secondColStyle}">
109
           &#160;
110
          </td>
111
      </tr>
112
      <tr><td colspan="2">
113
          <xsl:call-template name="citation">
114
            <xsl:with-param name="citationfirstColStyle" select="$protocolfirstColStyle"/>
115
            <xsl:with-param name="citationsubHeaderStyle" select="$protocolsubHeaderStyle"/>
116
          </xsl:call-template>
117
          </td>
118
      </tr>
119
    </xsl:for-each>
120
     <xsl:for-each select="protocol">
121
      <tr><td class="{$protocolfirstColStyle}">
122
          Protocol:
123
          </td>
124
          <td class="{$secondColStyle}">
125
           &#160;
126
          </td>
127
      </tr>
128
      <tr><td colspan="2">
129
          <xsl:call-template name="protocol">
130
            <xsl:with-param name="protocolfirstColStyle" select="$protocolfirstColStyle"/>
131
            <xsl:with-param name="protocolsubHeaderStyle" select="$protocolsubHeaderStyle"/>
132
          </xsl:call-template>
133
          </td>
134
      </tr>
135
    </xsl:for-each>
136
    <xsl:for-each select="instrumentation">
137
        <tr><td class="{$protocolfirstColStyle}">
138
          Instrument(s):
139
          </td>
140
          <td class="{$secondColStyle}">
141
            <xsl:value-of select="."/>
142
          </td>
143
      </tr>
144
    </xsl:for-each>
145
    <xsl:for-each select="software">
146
     <tr><td colspan="2">
147
          <xsl:call-template name="software">
148
            <xsl:with-param name="softwarefirstColStyle" select="$protocolfirstColStyle"/>
149
            <xsl:with-param name="softwaresubHeaderStyle" select="$protocolsubHeaderStyle"/>
150
          </xsl:call-template>
151
          </td>
152
      </tr>
153
    </xsl:for-each>
154
    <xsl:for-each select="subStep">
155
      <tr><td class="{$protocolfirstColStyle}">
156
          Substep<xsl:text> </xsl:text><xsl:value-of select="position()"/>
157
          </td>
158
          <td class="{$secondColStyle}">
159
           &#160;
160
          </td>
161
      </tr>
162
      <xsl:call-template name="step">
163
          <xsl:with-param name="protocolfirstColStyle" select="$protocolfirstColStyle"/>
164
          <xsl:with-param name="protocolsubHeaderStyle" select="$protocolsubHeaderStyle"/>
165
      </xsl:call-template>
166
    </xsl:for-each>
167
  </xsl:template>
168

  
169
  <xsl:template name="protocolAccess">
170
    <xsl:param name="protocolfirstColStyle"/>
171
    <xsl:param name="protocolsubHeaderStyle"/>
172
    <xsl:for-each select="access">
173
      <tr><td colspan="2">
174
         <xsl:call-template name="access">
175
           <xsl:with-param name="accessfirstColStyle" select="$protocolfirstColStyle"/>
176
           <xsl:with-param name="accesssubHeaderStyle" select="$protocolsubHeaderStyle"/>
177
         </xsl:call-template>
178
         </td>
179
       </tr>
180
    </xsl:for-each>
181
  </xsl:template>
182
</xsl:stylesheet>
183 0

  
lib/style/shared/eml-2/eml-access.xsl
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: cjones $'
10
  *     '$Date: 2006-11-17 13:37:07 -0800 (Fri, 17 Nov 2006) $'
11
  * '$Revision: 3094 $'
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

  
34

  
35
  <xsl:output method="html" encoding="iso-8859-1"
36
    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
37
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
38
    indent="yes" />  
39
  <xsl:template name="access">
40
    <xsl:param name="accessfirstColStyle"/>
41
    <xsl:param name="accesssubHeaderStyle"/>
42
    <table class="{$tabledefaultStyle}">
43
        <xsl:choose>
44
         <xsl:when test="references!=''">
45
          <xsl:variable name="ref_id" select="references"/>
46
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
47
          <xsl:for-each select="$references">
48
            <xsl:call-template name="accessCommon">
49
             <xsl:with-param name="accessfirstColStyle" select="$accessfirstColStyle"/>
50
             <xsl:with-param name="accesssubHeaderStyle" select="$accesssubHeaderStyle"/>
51
            </xsl:call-template>
52
          </xsl:for-each>
53
        </xsl:when>
54
        <xsl:otherwise>
55
          <xsl:call-template name="accessCommon">
56
             <xsl:with-param name="accessfirstColStyle" select="$accessfirstColStyle"/>
57
             <xsl:with-param name="accesssubHeaderStyle" select="$accesssubHeaderStyle"/>
58
          </xsl:call-template>
59
        </xsl:otherwise>
60
      </xsl:choose>
61
    </table>
62

  
63
  </xsl:template>
64
  <xsl:template name="accessCommon">
65
     <xsl:param name="accessfirstColStyle" />
66
     <xsl:param name="accesssubHeaderStyle"/>
67
        <xsl:call-template name="accesssystem">
68
           <xsl:with-param name="accessfirstColStyle" select="$accessfirstColStyle"/>
69
           <xsl:with-param name="accesssubHeaderStyle" select="$accesssubHeaderStyle"/>
70
        </xsl:call-template>
71
        <xsl:if test="normalize-space(./@order)='allowFirst' and (allow)">
72
            <xsl:call-template name="allow_deny">
73
                <xsl:with-param name="permission" select="'allow'"/>
74
                <xsl:with-param name="accessfirstColStyle" select="$accessfirstColStyle"/>
75
             </xsl:call-template>
76
        </xsl:if>
77
        <xsl:if test="(deny)">
78
           <xsl:call-template name="allow_deny">
79
                <xsl:with-param name="permission" select="'deny'"/>
80
                <xsl:with-param name="accessfirstColStyle" select="$accessfirstColStyle"/>
81
            </xsl:call-template>
82
        </xsl:if>
83
        <xsl:if test="normalize-space(acl/@order)='denyFirst' and (allow)">
84
            <xsl:call-template name="allow_deny">
85
                <xsl:with-param name="permission" select="'allow'"/>
86
                <xsl:with-param name="accessfirstColStyle" select="$accessfirstColStyle"/>
87
            </xsl:call-template>
88
        </xsl:if>
89

  
90

  
91
  </xsl:template>
92

  
93

  
94
  <xsl:template name="allow_deny">
95
   <xsl:param name="permission"/>
96
   <xsl:param name="accessfirstColStyle" />
97
   <xsl:choose>
98
       <xsl:when test="$permission='allow'">
99
          <xsl:for-each select="allow">
100
            <tr>
101
              <td class="{$accessfirstColStyle}">
102
               Allow:
103
              </td>
104
              <td class="{$accessfirstColStyle}">
105
                <xsl:for-each select="./permission">
106
                  <xsl:text>[</xsl:text><xsl:value-of select="."/><xsl:text>] </xsl:text>
107
                </xsl:for-each>
108
              </td>
109
              <td class="{$accessfirstColStyle}" >
110
                <xsl:for-each select="principal">
111
                  <xsl:value-of select="."/><br/>
112
                </xsl:for-each>
113
              </td>
114
            </tr>
115
          </xsl:for-each>
116
       </xsl:when>
117
       <xsl:otherwise>
118
         <xsl:for-each select="deny">
119
            <tr>
120
              <td class="{$accessfirstColStyle}">
121
               Deny:
122
              </td>
123
              <td class="{$accessfirstColStyle}">
124
                <xsl:for-each select="./permission">
125
                  <xsl:text>[</xsl:text><xsl:value-of select="."/><xsl:text>] </xsl:text>
126
                </xsl:for-each>
127
              </td>
128
              <td class="{$accessfirstColStyle}" >
129
                <xsl:for-each select="principal">
130
                  <xsl:value-of select="."/><br/>
131
                </xsl:for-each>
132
              </td>
133
            </tr>
134
         </xsl:for-each>
135
       </xsl:otherwise>
136
   </xsl:choose>
137

  
138
   </xsl:template>
139

  
140
  <xsl:template name="accesssystem">
141
       <xsl:param name="accessfirstColStyle" />
142
        <tr>
143
          <th colspan="3">
144
            <xsl:text>Access Control:</xsl:text>
145
          </th>
146
        </tr>
147
        <tr>
148
          <td class="{$accessfirstColStyle}">Auth System:</td>
149
          <td class="{$secondColStyle}"><xsl:value-of select="./@authSystem"/></td>
150
        </tr>
151
        <tr>
152
          <td class="{$accessfirstColStyle}">Order:</td>
153
          <td class="{$secondColStyle}"><xsl:value-of select="./@order"/></td>
154
        </tr>
155
  </xsl:template>
156

  
157
</xsl:stylesheet>
158 0

  
lib/style/shared/eml-2/eml.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile: eml.xsl,v $'
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: obrien $'
10
  *     '$Date: 2008-08-28 22:59:33 $'
11
  * '$Revision: 1.8 $'
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
-->
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff