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: 2003-06-05 18:44:45 -0700 (Thu, 05 Jun 2003) $'
11
  * '$Revision: 1631 $'
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-text-2.0.0.xsl"/>
36
  <xsl:import href="eml-dataset-2.0.0.xsl"/>
37

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