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: jones $'
10
  *     '$Date: 2001-01-18 11:02:14 -0800 (Thu, 18 Jan 2001) $'
11
  * '$Revision: 666 $'
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
  <xsl:output method="html" encoding="iso-8859-1"/>
35

    
36
  <xsl:template match="/">
37
    <html>
38
      <head>
39
        <link rel="stylesheet" type="text/css" 
40
              href="@web-base-url@/default.css" />
41
      </head>
42
      <body>
43
        <center>
44
          <h1>Data set description</h1>
45
          <h3>Ecological Metadata Language</h3>
46
        </center>
47
        <xsl:apply-templates/>      
48

    
49
        <table width="100%">
50
        <tr><td class="highlight">
51
        <b><xsl:text>Keywords:</xsl:text></b>
52
        </td></tr>
53
        <tr><td>
54
          <ul>
55
            <xsl:for-each select="//keyword_info/keyword">
56
              <li><xsl:value-of select="."/></li>
57
            </xsl:for-each>
58
          </ul>
59
        </td></tr>
60
        </table>
61
         
62

    
63
        <table width="100%">
64
        <tr><td class="highlight">
65
        <b><xsl:text>Related Metadata and Data Files:</xsl:text></b>
66
        </td></tr>
67
        <tr><td>
68
        <ul>
69
          <xsl:for-each select="//relations">
70
            <li>
71
             <xsl:value-of select="@object"/>
72
             <xsl:text> </xsl:text>
73
             <xsl:value-of select="@relation"/>
74
             <xsl:text> </xsl:text>
75
             <xsl:value-of select="@target"/>
76
            </li>
77
          </xsl:for-each>
78
        </ul>
79
        </td></tr>
80
        </table>
81

    
82
      </body>
83
    </html>
84
  </xsl:template>
85

    
86
  <xsl:template match="meta_file_id">
87
    <table width="100%">
88
    <tr>
89
    <td class="highlight"><b><xsl:text>Metadata File ID:</xsl:text></b></td>
90
    <td><xsl:value-of select="."/></td>
91
    </tr>
92
      <xsl:for-each select="//dataset_id|//title">
93
        <tr>
94
        <xsl:if test="name(.)='dataset_id'">
95
          <td class="highlight"><b><xsl:text>Data set ID:</xsl:text></b></td>
96
        </xsl:if>
97
        <xsl:if test="name(.)='title'">
98
          <td class="highlight"><b><xsl:text>Title:</xsl:text></b></td>
99
        </xsl:if>
100
        <td><xsl:value-of select="."/></td>
101
        </tr>
102
      </xsl:for-each>
103
    </table>
104

    
105
  </xsl:template>
106

    
107
  <xsl:template match="dataset_id"/>
108
  <xsl:template match="title"/>
109

    
110
  <xsl:template match="originator[1]">
111
      <table width="100%">
112
      <tr><td class="highlight">
113
      <b><xsl:text>Data Set Owner(s):</xsl:text></b>
114
      </td></tr>
115
      </table>
116
  </xsl:template>
117

    
118
  <xsl:template match="party_org">
119
    <br><b><xsl:value-of select="."/></b></br>
120
  </xsl:template>
121

    
122
  <xsl:template match="party_individual">
123
    <br>
124
    <b>
125
       <xsl:value-of select="./salutation"/>
126
       <xsl:text> </xsl:text>
127
       <xsl:value-of select="./given_name"/>
128
       <xsl:text> </xsl:text>
129
       <xsl:value-of select="./surname"/>
130
    </b></br>
131
    <br><xsl:value-of select="./title"/></br>
132
  </xsl:template>
133

    
134
  <xsl:template match="meta_address">
135
    <table>
136
    <xsl:for-each select="./address">
137
      <tr>
138
      <td><xsl:value-of select="."/></td>
139
      </tr>
140
    </xsl:for-each>
141
    <tr>
142
    <td><xsl:value-of select="./city"/>
143
        <xsl:text>, </xsl:text>
144
        <xsl:value-of select="./admin_area"/>
145
        <xsl:text> </xsl:text>
146
        <xsl:value-of select="./postal_code"/>
147
    </td>
148
    </tr>
149
    <xsl:if test="./work_phone">
150
      <tr><td><xsl:text>Work: </xsl:text><xsl:value-of select="./work_phone"/>
151
       </td></tr>
152
    </xsl:if>
153
    <xsl:if test="./home_phone">
154
      <tr><td><xsl:text>Home: </xsl:text><xsl:value-of select="./home_phone"/>
155
       </td></tr>
156
    </xsl:if>
157
    <xsl:if test="./fax">
158
      <tr><td><xsl:text>Fax: </xsl:text><xsl:value-of select="./fax"/></td></tr>
159
    </xsl:if>
160
    <xsl:if test="./email">
161
      <tr><td><xsl:value-of select="./email"/></td></tr>
162
    </xsl:if>
163
    <xsl:if test="./resource_url">
164
      <tr><td><xsl:value-of select="./resource_url"/></td></tr>
165
    </xsl:if>
166
    </table>
167
  </xsl:template>
168

    
169
  <xsl:template match="abstract">
170
    <table width="100%">
171
    <tr>
172
    <td class="highlight"><b><xsl:text>Abstract:</xsl:text></b></td>
173
    </tr>
174
    <tr>
175
    <td><xsl:value-of select="."/></td>
176
    </tr></table>
177
  </xsl:template>
178

    
179
  <xsl:template match="keyword_info"/>
180
  <xsl:template match="relations"/>
181

    
182
</xsl:stylesheet>
(2-2/8)