Project

General

Profile

1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Matt Jones
5
  *    Copyright: 2000 Regents of the University of California and the
6
  *               National Center for Ecological Analysis and Synthesis
7
  *  For Details: http://www.nceas.ucsb.edu/
8
  *
9
  *   '$Author: tao $'
10
  *     '$Date: 2000-11-20 05:14:04 -0800 (Mon, 20 Nov 2000) $'
11
  * '$Revision: 553 $'
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-settings-2.0.0.xsl"/>
34
  <xsl:import href="eml-identifier-2.0.0.xsl"/>
35
  <xsl:import href="eml-dataset-2.0.0.xsl"/>
36

    
37
  <xsl:output method="html" encoding="iso-8859-1"/>
38
  <!-- global variables to store id node set in case to be referenced-->
39
  <xsl:variable name="ids" select="//*[@id!='']"/>
40
  
41
  <xsl:template match="/">
42
    <html>
43
      <head>
44
        <link rel="stylesheet" type="text/css" 
45
              href="{$stylePath}/{$qformat}.css" />
46
      </head>
47
      <body>
48
        <xsl:apply-templates select="*[local-name()='eml']"/>
49
      </body>
50
    </html>
51
   </xsl:template>
52
   
53
   <xsl:template match="*[local-name()='eml']">
54
       <xsl:apply-templates select="dataset"/>
55
       <xsl:apply-templates select="citation"/>
56
       <xsl:apply-templates select="software"/>
57
       <xsl:apply-templates select="protocol"/>
58
   </xsl:template>
59
   
60
   <xsl:template match="dataset">
61
        <center>
62
           <xsl:if test="$displaymodule='dataset'">
63
            <h1>Data set description</h1>
64
            <h3>Ecological Metadata Language</h3>
65
           </xsl:if>
66
        </center>
67
        <table class="tabledefault" width="100%">
68
          <xsl:if test="$displaymodule='dataset'">
69
            <tr>
70
              <td width="100">
71
                <xsl:call-template name="identifier">
72
                  <xsl:with-param name="packageID" select="../@packageId"/>
73
                  <xsl:with-param name="system" select="../@system"/>
74
                </xsl:call-template>
75
                </td>
76
            </tr>
77
            <tr>
78
              <td width="100%">
79
                <xsl:apply-templates select="." mode="dataset"/>
80
              </td>
81
            </tr>
82
          </xsl:if>
83
        </table>
84
   </xsl:template>
85
   
86
   <xsl:template match="citation">
87
        <center>
88
          <h1>Citation description</h1>
89
          <h3>Ecological Metadata Language</h3>
90
        </center>
91
        <xsl:call-template name="identifier">
92
              <xsl:with-param name="packageID" select="../@packageId"/>
93
              <xsl:with-param name="system" select="../@system"/>
94
        </xsl:call-template>
95
   </xsl:template>
96
   
97
   <xsl:template match="software">
98
        <center>
99
          <h1>Software description</h1>
100
          <h3>Ecological Metadata Language</h3>
101
        </center>
102
        <xsl:call-template name="identifier">
103
              <xsl:with-param name="packageID" select="../@packageId"/>
104
              <xsl:with-param name="system" select="../@system"/>
105
        </xsl:call-template>
106
   </xsl:template>
107
   
108
   <xsl:template match="protocol">
109
       <center>
110
          <h1>Protocol description</h1>
111
          <h3>Ecological Metadata Language</h3>
112
        </center>
113
        <xsl:call-template name="identifier">
114
              <xsl:with-param name="packageID" select="../@packageId"/>
115
              <xsl:with-param name="system" select="../@system"/>
116
        </xsl:call-template>
117
   </xsl:template>
118
    
119
</xsl:stylesheet>
(2-2/26)