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 21:42:34 -0700 (Thu, 05 Jun 2003) $'
11
  * '$Revision: 1639 $'
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:import href="eml-resource-2.0.0.xsl"/>
35
  <xsl:import href="eml-party-2.0.0.xsl"/>
36
  <xsl:import href="eml-distribution-2.0.0.xsl"/>
37
  <xsl:import href="eml-coverage-2.0.0.xsl"/>
38
  <xsl:import href="eml-access-2.0.0.xsl"/>
39
  <xsl:import href="eml-project-2.0.0.xsl"/>
40
  
41
  <xsl:output method="html" encoding="iso-8859-1"/>
42
  
43
  <xsl:template match="dataset" mode="dataset">
44
    <table class="tabledefault" width="100%">
45
      <xsl:call-template name="datasetresource"/>
46
      <xsl:call-template name="datasetaccess"/>
47
      <xsl:call-template name="datasetpurpose"/>
48
      <xsl:call-template name="datasetmaintenance"/>
49
      <xsl:call-template name="datasetcontact"/>
50
      <xsl:call-template name="datasetpublisher"/>
51
      <xsl:call-template name="datasetpubplace"/>
52
      <xsl:call-template name="datasetproject"/>
53
    </table>
54
    
55
  </xsl:template>
56
  
57
  <xsl:template name="datasetresource">
58
     <tr>
59
        <td colspan="2" width="100%">
60
          <xsl:call-template name="resource">
61
            <xsl:with-param name="resfirstColStyle" select="$firstColStyle"/>
62
            <xsl:with-param name="ressubHeaderStyle" select="$subHeaderStyle"/>
63
          </xsl:call-template>
64
       </td>
65
     </tr>
66
  </xsl:template>
67
  
68
 
69
  
70
  <xsl:template name="datasetpurpose">
71
    <xsl:for-each select="purpose">
72
       <tr>
73
            <td width="{$firstColWidth}" align="right" class="{$firstColStyle}">
74
            Purpose:
75
            </td>
76
            <td width="{$secondColWidth}" class="{$secondColStyle}" >
77
             &#160;
78
            </td>
79
       </tr>
80
       <tr>
81
        <td colspan="2" width="100%">
82
        <xsl:call-template name="text">
83
          <xsl:with-param name="textfirstColStyle" select="$firstColStyle"/>
84
          <xsl:with-param name="textsubHeaderStyle" select="$subHeaderStyle"/>
85
        </xsl:call-template>
86
        </td>
87
      </tr>
88
    </xsl:for-each>
89
  </xsl:template>
90
  
91
  <xsl:template name="datasetmaintenance">
92
    <xsl:for-each select="maintenance">
93
      <tr><td class="{$subHeaderStyle}" colspan="2">
94
        <xsl:text>Maintenance:</xsl:text>
95
     </td></tr>
96
     <xsl:call-template name="mantenancedescription"/>
97
      <tr>
98
          <td width="{$firstColWidth}" align="right" class="{$firstColStyle}">
99
          Frequency:
100
          </td>
101
          <td width="{$secondColWidth}" class="{$secondColStyle}" >
102
           <xsl:value-of select="maintenanceUpdateFrequency"/>
103
          </td>
104
     </tr>
105
     <xsl:call-template name="changehistory"/>
106
   </xsl:for-each>
107
  </xsl:template>
108
  
109
  <xsl:template name="maintenancedescription">
110
   <xsl:for-each select="description">
111
     <tr>
112
          <td width="{$firstColWidth}" align="right" class="{$firstColStyle}">
113
          Description:
114
          </td>
115
          <td width="{$secondColWidth}" class="{$secondColStyle}" >
116
           &#160;
117
          </td>
118
     </tr>
119
     <tr>
120
        <td colspan="2" width="100%">
121
        <xsl:call-template name="text">
122
          <xsl:with-param name="textfirstColStyle" select="$firstColStyle"/>
123
          <xsl:with-param name="textsubHeaderStyle" select="$subHeaderStyle"/>
124
        </xsl:call-template>
125
        </td>
126
      </tr>
127
    </xsl:for-each>
128
  </xsl:template>
129
  
130
   <xsl:template name="datasetchangehistory">
131
   <xsl:if test="changeHistory">
132
     <tr>
133
          <td width="{$firstColWidth}" align="right" class="{$firstColStyle}">
134
          History:
135
          </td>
136
          <td width="{$secondColWidth}" class="{$secondColStyle}" >
137
            <table width="100%">
138
              <xsl:for-each select="changeHistory">
139
                <xsl:call-template name="historydetails"/>
140
              </xsl:for-each>
141
            </table>
142
          </td>
143
     </tr>
144
     </xsl:if>
145
   </xsl:template>
146
   
147
   <xsl:template name="historydetails">
148
        <tr><td width="{$firstColWidth}" class="{$firstColStyle}">
149
            scope:</td>
150
            <td width="{$secondColWidth}" class="{$secondColStyle}">
151
            <xsl:value-of select="changeScope"/>
152
        </td></tr>
153
        <tr><td width="{$firstColWidth}" class="{$firstColStyle}">
154
            old value:</td>
155
            <td width="{$secondColWidth}" class="{$secondColStyle}">
156
            <xsl:value-of select="oldValue"/>
157
        </td></tr>
158
        <tr><td width="{$firstColWidth}" class="{$firstColStyle}">
159
            change date:</td>
160
            <td width="{$secondColWidth}" class="{$secondColStyle}">
161
            <xsl:value-of select="changeDate"/>
162
        </td></tr>
163
        <xsl:if test="comment and normalize-space(comment)!=''">
164
          <tr><td width="{$firstColWidth}" class="{$firstColStyle}">
165
            comment:</td><td width="{$secondColWidth}" class="{$secondColStyle}">
166
            <xsl:value-of select="comment"/>
167
          </td></tr>
168
        </xsl:if>
169
  </xsl:template>
170
  
171
  <xsl:template name="datasetcontact">
172
    <tr><td class="{$subHeaderStyle}" colspan="2">
173
        <xsl:text>Contact:</xsl:text>
174
     </td></tr>
175
    <xsl:for-each select="contact">
176
     <tr><td colspan="2">
177
       <xsl:call-template name="party">
178
              <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
179
       </xsl:call-template>
180
     </td></tr>
181
     <tr><td width="{$firstColWidth}" class="{$firstColStyle}">&#160;</td>
182
      <td width="{$secondColWidth}" class="{$secondColStyle}">&#160;</td></tr>
183
    </xsl:for-each>
184
  </xsl:template>
185
  
186
  <xsl:template name="datasetpublisher">
187
   <xsl:for-each select="publisher">
188
     <tr><td class="{$subHeaderStyle}" colspan="2">
189
        <xsl:text>Publisher:</xsl:text>
190
     </td></tr>
191
     <tr><td colspan="2">
192
       <xsl:call-template name="party">
193
              <xsl:with-param name="partyfirstColStyle" select="$firstColStyle"/>
194
       </xsl:call-template>
195
     </td></tr>
196
     <tr><td width="{$firstColWidth}" class="{$firstColStyle}">&#160;</td>
197
      <td width="{$secondColWidth}" class="{$secondColStyle}">&#160;</td></tr>
198
   </xsl:for-each>
199
  </xsl:template>
200
  
201
  <xsl:template name="datasetpubplace">
202
    <xsl:for-each select="pubPlace">
203
      <tr><td width="{$firstColWidth}" class="{$firstColStyle}">
204
           Publish Place:</td>
205
          <td width="{$secondColWidth}" class="{$secondColStyle}">
206
          <xsl:value-of select="."/>
207
          </td>
208
      </tr>
209
   </xsl:for-each>
210
  </xsl:template>
211
   
212
   <xsl:template name="datasetproject">
213
    <xsl:for-each select="project">
214
      <tr>
215
        <td colspan="2" width="100%">
216
        <xsl:call-template name="project">
217
          <xsl:with-param name="projectfirstColStyle" select="$firstColStyle"/>
218
        </xsl:call-template>
219
        </td>
220
      </tr>
221
    </xsl:for-each>
222
  </xsl:template>
223
  
224
   <xsl:template name="datasetaccess">
225
    <xsl:for-each select="access">
226
      <tr>
227
        <td colspan="2" width="100%">
228
        <xsl:call-template name="access">
229
          <xsl:with-param name="accessfirstColStyle" select="$firstColStyle"/>
230
          <xsl:with-param name="accesssubHeaderStyle" select="$subHeaderStyle"/>
231
        </xsl:call-template>
232
        </td>
233
      </tr>
234
    </xsl:for-each>
235
  </xsl:template>
236
  
237
  <xsl:template match="text()" mode="dataset" />
238
  <xsl:template match="text()" mode="resource" />
239

    
240
</xsl:stylesheet>
(10-10/26)