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-07-01 18:32:06 -0700 (Tue, 01 Jul 2003) $'
11
  * '$Revision: 1715 $'
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 xsl:use-attribute-sets="cellspacing" 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="projectcommon">
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="projectcommon">
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}">
109
             <table xsl:use-attribute-sets="cellspacing" width="100%">
110
                 <xsl:for-each select="personnel">
111
                       <tr><td colspan="2">
112
                              <xsl:call-template name="party">
113
                                 <xsl:with-param name="partyfirstColStyle" select="$projectfirstColStyle"/>
114
                              </xsl:call-template>
115
                       </td></tr>
116
                       <xsl:for-each select="role">
117
                          <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
118
                                 Role:
119
                               </td>
120
                               <td width="{$secondColWidth}">
121
                                 <table xsl:use-attribute-sets="cellspacing" class="tableparty" width="100%">
122
                                     <tr>
123
                                         <td width="100%" class="{$secondColStyle}">
124
                                            <xsl:value-of select="."/>
125
                                          </td>
126
                                      </tr>
127
                                  </table>
128
                               </td>
129
                          </tr>
130
                      </xsl:for-each>
131
                </xsl:for-each>
132
             </table>
133
         </td>
134
     </tr>
135
  </xsl:template>
136
  
137
  
138
   <xsl:template name="projectabstract">
139
     <xsl:param name="projectfirstColStyle"/>
140
     <xsl:for-each select="abstract">
141
       <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
142
          Abstract:
143
          </td>
144
          <td width="{$secondColWidth}">
145
             <xsl:call-template name="text">
146
                <xsl:with-param name="textfirstColStyle" select="$projectfirstColStyle"/>
147
             </xsl:call-template>
148
         </td>
149
       </tr>
150
     </xsl:for-each>
151
  </xsl:template>
152
  
153
  <xsl:template name="projectfunding">
154
     <xsl:param name="projectfirstColStyle"/>
155
     <xsl:for-each select="funding">
156
       <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
157
          Funding:
158
          </td>
159
          <td width="{$secondColWidth}">
160
              <xsl:call-template name="text">
161
                 <xsl:with-param name="textfirstColStyle" select="$projectfirstColStyle"/>
162
              </xsl:call-template>
163
         </td>
164
       </tr>
165
    </xsl:for-each>
166
  </xsl:template>
167
  
168
  
169
  
170
   <xsl:template name="projectstudyareadescription">
171
     <xsl:param name="projectfirstColStyle"/>
172
     <xsl:for-each select="studyAreaDescription">
173
       <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
174
           <xsl:text>Study Area:</xsl:text>
175
          </td>
176
          <td width="{$secondColWidth}">
177
              <table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
178
                  <xsl:for-each select="descriptor">
179
                      <xsl:for-each select="descriptorValue">
180
                      <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
181
                            <xsl:value-of select="../@name"/>
182
                          </td>
183
                          <td width="{$secondColWidth}" class="{$secondColStyle}">
184
                              <xsl:value-of select="descriptorValue"/><xsl:value-of select="./@name_or_id"/>
185
                          </td>
186
                      </tr>
187
                      </xsl:for-each>
188
                      <xsl:for-each select="citation">
189
                        <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
190
                              Citation:
191
                            </td>
192
                            <td width="{$secondColWidth}">
193
                             <xsl:call-template name="citation"> 
194
                                  <xsl:with-param name="citationfirstColStyle" select="projectfirstColStyle"/>
195
                             </xsl:call-template>
196
                           </td>
197
                       </tr>
198
                    </xsl:for-each>
199
               </xsl:for-each>
200
            </table>
201
         </td>
202
       </tr>
203
     
204
       <xsl:for-each select="citation">
205
         <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
206
          Study Area Citation:
207
          </td>
208
          <td width="{$secondColWidth}">
209
              <xsl:call-template name="citation">
210
                   <xsl:with-param name="citationfirstColStyle" select="projectfirstColStyle"/>             
211
               </xsl:call-template>
212
          </td>
213
        </tr>
214
      </xsl:for-each>
215
       
216
       <xsl:for-each select="coverage">
217
        <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
218
          Study Area Coverage:
219
          </td>
220
          <td width="{$secondColWidth}">
221
             <xsl:call-template name="coverage"/>
222
          </td>
223
        </tr>
224
      </xsl:for-each>  
225
    </xsl:for-each>
226
   </xsl:template>
227
  
228
  
229
  
230
  <xsl:template name="projectdesigndescription">
231
    <xsl:param name="projectfirstColStyle"/>
232
    <xsl:for-each select="designDescription">
233
       <xsl:for-each select="description">
234
        <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
235
          Design Description:
236
          </td>
237
          <td width="{$secondColWidth}">
238
             <xsl:call-template name="text"/>
239
         </td>
240
       </tr>
241
      </xsl:for-each>
242
      <xsl:for-each select="citation">
243
        <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
244
          Design Citation:
245
          </td>
246
          <td width="{$secondColWidth}" >
247
             <xsl:call-template name="citation"/>
248
         </td>
249
       </tr>
250
      </xsl:for-each>
251
    </xsl:for-each>
252
  </xsl:template>
253

    
254
  
255
  
256
  <xsl:template name="projectrelatedproject">
257
    <xsl:param name="projectfirstColStyle"/>
258
    <xsl:for-each select="relatedProject">
259
       <tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
260
          Related Project:
261
          </td>
262
          <td width="{$secondColWidth}">
263
            <xsl:call-template name="project">
264
              <xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
265
            </xsl:call-template>
266
         </td>
267
       </tr>
268
    </xsl:for-each>
269
  </xsl:template>
270
 
271

    
272
</xsl:stylesheet>
(20-20/30)