Project

General

Profile

1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Matthew Brooke
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:43:15 -0700 (Thu, 05 Jun 2003) $'
11
  * '$Revision: 1640 $'
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-variable.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
  
37
   <xsl:template name="project">
38
      <xsl:param name="projectfirstColStyle"/>
39
      <table class="tabledefault" width="100%">
40
        <xsl:choose>
41
         <xsl:when test="references!=''">
42
          <xsl:variable name="ref_id" select="references"/>
43
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
44
          <xsl:for-each select="$references">
45
            <xsl:call-template name="projectcommn">
46
             <xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
47
            </xsl:call-template>
48
          </xsl:for-each>
49
        </xsl:when>
50
        <xsl:otherwise>
51
          <xsl:call-template name="projectcommn">
52
             <xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
53
           </xsl:call-template>
54
        </xsl:otherwise>
55
      </xsl:choose>
56
      </table>
57
  </xsl:template>
58
  
59
  
60
  
61
  <xsl:template name="projectcommon">
62
    <xsl:param name="projectfirstColStyle"/>
63
    <xsl:call-template name="projecttitle">
64
      <xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
65
    </xsl:call-template>
66
    <xsl:call-template name="projectpersonnel">
67
      <xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
68
    </xsl:call-template>
69
    <xsl:call-template name="projectabstract">
70
      <xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
71
    </xsl:call-template>
72
    <xsl:call-template name="projectfunding">
73
      <xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
74
    </xsl:call-template>
75
   <xsl:call-template name="projectstudyareadescription">
76
      <xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
77
    </xsl:call-template>
78
    <xsl:call-template name="projectdesigndescription">
79
      <xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
80
    </xsl:call-template>
81
    <xsl:call-template name="projectrelatedproject">
82
      <xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
83
    </xsl:call-template>
84
  </xsl:template>
85

    
86
  
87
  
88
   <xsl:template name="projecttitle">
89
     <xsl:param name="projectfirstColStyle"/>
90
     <xsl:for-each select="title">
91
        <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
92
             Title:
93
             </td>
94
             <td width="{$secondColWidth}" class="{$secondColStyle}" >
95
              <xsl:value-of select="../title"/>
96
             </td>
97
       </tr>
98
     </xsl:for-each>
99
  </xsl:template>
100
  
101
  
102
  
103
  <xsl:template name="projectpersonnel">
104
     <xsl:param name="projectfirstColStyle"/>
105
     <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
106
          Personnel:
107
          </td>
108
          <td width="{$secondColWidth}" class="{$secondColStyle}" >
109
              &#160;
110
          </td>
111
     </tr>
112
     <xsl:for-each select="personnel">
113
       <tr><td colspan="2">
114
         <xsl:call-template name="party">
115
              <xsl:with-param name="partyfirstColStyle" select="$projectfirstColStyle"/>
116
         </xsl:call-template>
117
       </td></tr>
118
       <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">&#160;</td>
119
       <td width="{$secondColWidth}" class="{$secondColStyle}">&#160;</td></tr>
120
    </xsl:for-each>
121
  </xsl:template>
122
  
123
  
124
  
125
   <xsl:template name="projectabstract">
126
     <xsl:param name="projectfirstColStyle"/>
127
     <xsl:for-each select="abstract">
128
       <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
129
          Abstract:
130
          </td>
131
          <td width="{$secondColWidth}" class="{$secondColStyle}" >
132
              &#160;
133
         </td>
134
       </tr>
135
       <tr><td colspan="2">
136
         <xsl:call-template name="text">
137
              <xsl:with-param name="textfirstColStyle" select="$projectfirstColStyle"/>
138
         </xsl:call-template>
139
       </td></tr>
140
    </xsl:for-each>
141
  </xsl:template>
142
  
143
  <xsl:template name="projectfunding">
144
     <xsl:param name="projectfirstColStyle"/>
145
     <xsl:for-each select="funding">
146
       <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
147
          Funding:
148
          </td>
149
          <td width="{$secondColWidth}" class="{$secondColStyle}" >
150
              &#160;
151
         </td>
152
       </tr>
153
       <tr><td colspan="2">
154
         <xsl:call-template name="text">
155
              <xsl:with-param name="textfirstColStyle" select="$projectfirstColStyle"/>
156
         </xsl:call-template>
157
       </td></tr>
158
    </xsl:for-each>
159
  </xsl:template>
160
  
161
  
162
  
163
   <xsl:template name="projectstudyareadescription">
164
     <xsl:param name="projectfirstColStyle"/>
165
     <xsl:for-each select="studyAreaDescription">
166
       <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
167
          Study Area:
168
          </td>
169
          <td width="{$secondColWidth}" class="{$secondColStyle}" >
170
              &#160;
171
         </td>
172
       </tr>
173
       <xsl:for-each select="descriptor">
174
          <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
175
          &#160;
176
          </td>
177
          <td width="{$secondColWidth}" class="{$secondColStyle}" >
178
             <xsl:value-of select="descriptorValue"/>
179
         </td>
180
        </tr>
181
        <xsl:if test="citation">
182
          <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
183
          &#160;
184
          </td>
185
          <td width="{$secondColWidth}" class="{$secondColStyle}" >
186
             <table width="100%">
187
                <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
188
                    citation:
189
                     </td>
190
                     <td width="{$secondColWidth}" class="{$secondColStyle}" >
191
                        <xsl:call-template name="citation">
192
                        </xsl:call-template>
193
                    </td>
194
                </tr>
195
             </table>
196
         </td>
197
        </tr>
198
        </xsl:if>
199
       </xsl:for-each>
200
       
201
       <xsl:for-each select="citation">
202
         <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
203
          &#160;
204
          </td>
205
          <td width="{$secondColWidth}" class="{$secondColStyle}" >
206
             <table width="100%">
207
                <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
208
                    citation:
209
                     </td>
210
                     <td width="{$secondColWidth}" class="{$secondColStyle}" >
211
                        <xsl:call-template name="citation">
212
                        </xsl:call-template>
213
                    </td>
214
                </tr>
215
             </table>
216
         </td>
217
        </tr>
218
      </xsl:for-each>
219
       
220
       <xsl:for-each select="coverage">
221
        <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
222
          &#160;
223
          </td>
224
          <td width="{$secondColWidth}" class="{$secondColStyle}" >
225
             <xsl:call-template name="coverage"/>
226
          </td>
227
        </tr>
228
      </xsl:for-each>
229
       
230
    </xsl:for-each>
231
   </xsl:template>
232
  
233
  
234
  
235
  <xsl:template name="projectdesigndescription">
236
    <xsl:param name="projectfirstColStyle"/>
237
    <xsl:for-each select="designDescription">
238
       <xsl:for-each select="description">
239
        <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
240
          Design Description:
241
          </td>
242
          <td width="{$secondColWidth}" class="{$secondColStyle}" >
243
             <xsl:call-template name="text"/>
244
         </td>
245
       </tr>
246
      </xsl:for-each>
247
      <xsl:for-each select="citation">
248
        <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
249
          Design Citation:
250
          </td>
251
          <td width="{$secondColWidth}" class="{$secondColStyle}" >
252
             <xsl:call-template name="citation"/>
253
         </td>
254
       </tr>
255
      </xsl:for-each>
256
    </xsl:for-each>
257
  </xsl:template>
258

    
259
  
260
  
261
  <xsl:template name="projectrelatedproject">
262
    <xsl:param name="projectfirstColStyle"/>
263
    <xsl:for-each select="relatedProject">
264
       <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
265
          Related Project:
266
          </td>
267
          <td width="{$secondColWidth}" class="{$secondColStyle}" >
268
             &#160;
269
         </td>
270
       </tr>
271
       <tr><td colspan="2">
272
           <xsl:call-template name="project">
273
             <xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
274
           </xsl:call-template>
275
           </td>
276
       </tr>
277
    </xsl:for-each>
278
  </xsl:template>
279
 
280

    
281
</xsl:stylesheet>
(20-20/33)