Project

General

Profile

1
<?xml version="1.0"?>
2
<!--
3
  * eml-dataset-display.xsl
4
  *
5
  *      Authors: Matt Jones
6
  *    Copyright: 2000 Regents of the University of California and the 
7
  *               National Center for Ecological Analysis and Synthesis
8
  *  For Details: http://www.nceas.ucsb.edu/
9
  *      Created: 2000 April 5
10
  *      Version: 0.01
11
  *    File Info: '$Id: eml-dataset-display.xsl 506 2000-10-31 01:12:16Z jones $'
12
  *
13
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
14
  * convert an XML file that is valid with respect to the eml-dataset.dtd
15
  * module of the Ecological Metadata Language (EML) into an HTML format 
16
  * suitable for rendering with modern web browsers.
17
-->
18
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
19

    
20
  <xsl:output method="html" encoding="iso-8859-1"/>
21

    
22
  <xsl:template match="/">
23
    <html>
24
      <head>
25
        <link rel="stylesheet" type="text/css" 
26
              href="@web-base-url@/default.css" />
27
      </head>
28
      <body>
29
        <center>
30
          <h1>Data set description</h1>
31
          <h3>Ecological Metadata Language</h3>
32
        </center>
33
        <xsl:apply-templates/>      
34

    
35
        <table width="100%">
36
        <tr><td class="highlight">
37
        <b><xsl:text>Keywords:</xsl:text></b>
38
        </td></tr>
39
        <tr><td>
40
          <ul>
41
            <xsl:for-each select="//keyword_info/keyword">
42
              <li><xsl:value-of select="."/></li>
43
            </xsl:for-each>
44
          </ul>
45
        </td></tr>
46
        </table>
47
         
48

    
49
        <table width="100%">
50
        <tr><td class="highlight">
51
        <b><xsl:text>Related Metadata and Data Files:</xsl:text></b>
52
        </td></tr>
53
        <tr><td>
54
        <ul>
55
          <xsl:for-each select="//relations">
56
            <li>
57
             <xsl:value-of select="@object"/>
58
             <xsl:text> </xsl:text>
59
             <xsl:value-of select="@relation"/>
60
             <xsl:text> </xsl:text>
61
             <xsl:value-of select="@target"/>
62
            </li>
63
          </xsl:for-each>
64
        </ul>
65
        </td></tr>
66
        </table>
67

    
68
      </body>
69
    </html>
70
  </xsl:template>
71

    
72
  <xsl:template match="meta_file_id">
73
    <table width="100%">
74
    <tr>
75
    <td class="highlight"><b><xsl:text>Metadata File ID:</xsl:text></b></td>
76
    <td><xsl:value-of select="."/></td>
77
    </tr>
78
      <xsl:for-each select="//dataset_id|//title">
79
        <tr>
80
        <xsl:if test="name(.)='dataset_id'">
81
          <td class="highlight"><b><xsl:text>Data set ID:</xsl:text></b></td>
82
        </xsl:if>
83
        <xsl:if test="name(.)='title'">
84
          <td class="highlight"><b><xsl:text>Title:</xsl:text></b></td>
85
        </xsl:if>
86
        <td><xsl:value-of select="."/></td>
87
        </tr>
88
      </xsl:for-each>
89
    </table>
90

    
91
  </xsl:template>
92

    
93
  <xsl:template match="dataset_id"/>
94
  <xsl:template match="title"/>
95

    
96
  <xsl:template match="originator[1]">
97
      <table width="100%">
98
      <tr><td class="highlight">
99
      <b><xsl:text>Data Set Owner(s):</xsl:text></b>
100
      </td></tr>
101
      </table>
102
  </xsl:template>
103

    
104
  <xsl:template match="party_org">
105
    <br><b><xsl:value-of select="."/></b></br>
106
  </xsl:template>
107

    
108
  <xsl:template match="party_individual">
109
    <br>
110
    <b>
111
       <xsl:value-of select="./salutation"/>
112
       <xsl:text> </xsl:text>
113
       <xsl:value-of select="./given_name"/>
114
       <xsl:text> </xsl:text>
115
       <xsl:value-of select="./surname"/>
116
    </b></br>
117
    <br><xsl:value-of select="./title"/></br>
118
  </xsl:template>
119

    
120
  <xsl:template match="meta_address">
121
    <table>
122
    <xsl:for-each select="./address">
123
      <tr>
124
      <td><xsl:value-of select="."/></td>
125
      </tr>
126
    </xsl:for-each>
127
    <tr>
128
    <td><xsl:value-of select="./city"/>
129
        <xsl:text>, </xsl:text>
130
        <xsl:value-of select="./admin_area"/>
131
        <xsl:text> </xsl:text>
132
        <xsl:value-of select="./postal_code"/>
133
    </td>
134
    </tr>
135
    <xsl:if test="./work_phone">
136
      <tr><td><xsl:text>Work: </xsl:text><xsl:value-of select="./work_phone"/>
137
       </td></tr>
138
    </xsl:if>
139
    <xsl:if test="./home_phone">
140
      <tr><td><xsl:text>Home: </xsl:text><xsl:value-of select="./home_phone"/>
141
       </td></tr>
142
    </xsl:if>
143
    <xsl:if test="./fax">
144
      <tr><td><xsl:text>Fax: </xsl:text><xsl:value-of select="./fax"/></td></tr>
145
    </xsl:if>
146
    <xsl:if test="./email">
147
      <tr><td><xsl:value-of select="./email"/></td></tr>
148
    </xsl:if>
149
    <xsl:if test="./resource_url">
150
      <tr><td><xsl:value-of select="./resource_url"/></td></tr>
151
    </xsl:if>
152
    </table>
153
  </xsl:template>
154

    
155
  <xsl:template match="abstract">
156
    <table width="100%">
157
    <tr>
158
    <td class="highlight"><b><xsl:text>Abstract:</xsl:text></b></td>
159
    </tr>
160
    <tr>
161
    <td><xsl:value-of select="."/></td>
162
    </tr></table>
163
  </xsl:template>
164

    
165
  <xsl:template match="keyword_info"/>
166
  <xsl:template match="relations"/>
167

    
168
</xsl:stylesheet>
(1-1/7)