Project

General

Profile

« Previous | Next » 

Revision 1640

Added by Jing Tao almost 22 years ago

Revise the project module from beta6

View differences:

lib/style/eml2/eml-project-2.0.0.xsl
31 31
-->
32 32
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
33 33

  
34
<xsl:import href="eml-protocol-2.0.0beta6-@name@.xsl"/>
35
<xsl:import href="eml-coverage-2.0.0beta6-@name@.xsl"/>
36

  
37 34
  <xsl:output method="html" encoding="iso-8859-1"/>
38 35

  
39
  <xsl:template match="/">
40
   <html>
41
     <head>
42
        <link rel="stylesheet" type="text/css" href="{$stylePath}/{$qformat}.css" />
43
      <style type="text/css">
44
        @import url(@style-path@/sbclter-advanced.css);
45
      </style>
46
        <script language="JavaScript">
47
          <![CDATA[
48
          function submitform(action,form_ref) {
49
              form_ref.action.value=action;
50
              form_ref.abstractpath.value="";
51
              form_ref.qformat.value="sbclter";
52
              form_ref.submit();
53
          }
54
          function submitform1(action, abstractpath, form_ref) {
55
              form_ref.action.value=action;
56
              form_ref.abstractpath.value=abstractpath;
57
              form_ref.qformat.value="";
58
              form_ref.submit();
59
          }
60
          function submitform2(action, qformat, form_ref) {
61
              form_ref.action.value=action;
62
              form_ref.qformat.value=qformat;
63
              form_ref.abstractpath.value="";
64
              form_ref.submit();
65
          }
66
          ]]>
67
        </script>
68
     </head>
69
     <body>
70
      <!--<div class="header-logo">
71
        <img src="/catalog/img/catalog/sbclter-logo.gif" alt="SBC LTER" border="0" />
72
      </div>-->
73
      <div class="spacing" align="center">
74
        <table cellspacing="0" width="100%" border="0">
75
          <tr>
76
            <td class="header-title">
77
              <div class="header-title">
78
                @header-title@
79
              </div>
80
               <div class="header-subtitle">
81
                @header-subtitle@
82
              </div>
83
            </td>
84
            <td class="header-image" rowspan="1">
85
              <div class="header-image">
86
                <img class="header" src="@html-path@/@header-image@"
87
                  alt="@header-image-alt@"
88
                   border="0" />
89
              </div>
90
            </td>
91
          </tr>
92
          <tr>
93
            <td class="header-menu" colspan="2">
94
              <div class="header-menu">
95
                @header-menu@
96
              </div>
97
            </td>
98
          </tr>
99
          <tr>
100
            <td class="header-submenu" colspan="2">
101
              <div class="header-submenu">
102
                &#160; <!-- &nbsp; that is XML compliant -->
103
              </div>
104
            </td>
105
          </tr>
106
        </table>
107
      </div>
108
      <div class="content-spacing" align="center">
109
        <table cellspacing="0" width="100%" height="100%" border="0">
110
          <tr>
111
           <td class="content-area" colspan="2">
112
            <!-- END SBCLTER PAGE TOP HTML -->
113
             <div class="content-area">
114
               <center>
115
                 <h1>Project Description</h1>
116
                 <!--h3>Ecological Metadata Language</h3--><br />
117
               </center>
118
               <table class="tabledefault" width="100%">
119
               <!-- width needed for NN4 - doesn't recognize width in css -->
120
                 <!--xsl:apply-templates select="eml-project/identifier" mode="resource"/-->
121
                 <xsl:apply-templates select="eml-project/researchProject"/>
122
               </table>
123
             </div>
124
           </td>
125
          </tr>
126
          <tr>
127
            <td colspan="2">
128
              <!--div class="nsf" >This material is based on the upon work
129
              supported by the National Science Foundation under Cooperative
130
              Agreement #OCE-9982105. Any opinions, findings, or recommendations
131
              expressed in the material are those of author(s) and do not
132
              necessarily reflect the view of the National Science Foundation.
133
              </div-->
134
            </td>
135
          </tr>
136
          <tr>
137
            <td class="footer-menu" colspan="2">
138
              <div class="footer-menu">
139
                @footer-menu@
140
              </div>
141
            </td>
142
          </tr>
143
          <tr>
144
            <td class="footer-left">
145
              <div class="footer-left">
146
                @copyright@
147
              </div>
148
            </td>
149
            <td class="footer-right">
150
              <div class="footer-right">
151
               Contact: <a class="footer-link"
152
                        href="@mailto-address@">
153
                        @header-subtitle@data@nceas.ucsb.edu
154
                        </a> |
155
                <a class="footer-link"
156
                   href="@intranet-address@"
157
                   target="offline">Internal Login
158
                </a>
159
              </div>
160
            </td>
161
          </tr>
162
        </table>
163
      </div>
164
     </body>
165
    </html>
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>
166 57
  </xsl:template>
167

  
168
  <xsl:template match="researchProject">
169
      <xsl:apply-templates select="./title" mode="resource"/>
170
      <tr><td class="{$subHeaderStyle}" colspan="2">Personnel:</td></tr>
171
      <xsl:for-each select="personnel">
172
          <xsl:apply-templates select="." mode="party"/>
173
      </xsl:for-each>
174
      <xsl:apply-templates select="./temporalCov"/>
175
      <xsl:apply-templates select="./geographicCov"/>
176
      <xsl:apply-templates select="./abstract" mode="resource"/>
177
      <xsl:apply-templates select="./funding"/>
178
      <xsl:apply-templates select="./siteDescription"/>
179
      <xsl:apply-templates select="./designDescription"/>
180
      <xsl:apply-templates select="./researchProject" mode="recursive"/>
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>
181 84
  </xsl:template>
182 85

  
183
  <xsl:template match="funding">
184
    <tr class="{$subHeaderStyle}"><td colspan="2">
185
      <xsl:text>Funding:</xsl:text></td></tr>
186
      <xsl:call-template name="renderParagsCits"/>
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>
187 99
  </xsl:template>
188

  
189
  <xsl:template match="siteDescription">
190
    <tr class="{$subHeaderStyle}"><td colspan="2">
191
      <xsl:text>Site Description:</xsl:text></td></tr>
192
      <xsl:call-template name="renderParagsCits"/>
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>
193 121
  </xsl:template>
194

  
195

  
196
  <xsl:template match="title" mode="resource">
197
      <xsl:if test="normalize-space(../title)!=''">
198
      <tr><td width="{$firstColWidth}">
199
        <b>Title:</b></td><td width="{$secondColWidth}" >
200
        <b><xsl:value-of select="../title"/></b></td></tr>
201
      </xsl:if>
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>
202 141
  </xsl:template>
203

  
204
  <xsl:template match="designDescription">
205
    <tr class="{$subHeaderStyle}"><td colspan="2">
206
      <xsl:text>DESIGN DESCRIPTION:</xsl:text></td></tr>
207
      <tr><td width="{$firstColWidth}" class="{$firstColStyle}">&#160;</td>
208
        <td width="{$secondColWidth}" class="{$secondColStyle}">&#160;</td></tr>
209
      <tr><td width="{$firstColWidth}" class="{$firstColStyle}">&#160;</td>
210
        <td width="{$secondColWidth}" class="{$secondColStyle}">
211
    <table width="100%">
212
      <xsl:apply-templates select="protocol"/>
213

  
214
      <xsl:apply-templates select="sampling"/>
215

  
216
      <xsl:for-each select="./paragraph">
217
          <xsl:if test="normalize-space(./paragraph)!=''">
218
            <tr><td width="{$firstColWidth}" class="{$firstColStyle}">
219
            Additional Info:</td><td width="{$secondColWidth}" class="{$secondColStyle}">
220
            <xsl:value-of select="./paragraph"/></td></tr>
221
          </xsl:if>
222
      </xsl:for-each>
223

  
224
    <tr class="{$subHeaderStyle}"><td colspan="2">
225
      <xsl:text>Literature Citation:</xsl:text></td></tr>
226
      <xsl:apply-templates select="citation"/>
227

  
228
    </table></td></tr>
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>
229 159
  </xsl:template>
230

  
231

  
232
  <xsl:template match="sampling">
233

  
234
    <tr class="{$subHeaderStyle}"><td colspan="2">Sampling:</td></tr>
235

  
236
      <xsl:if test="normalize-space(./frequency)!=''">
237
        <tr><td width="{$firstColWidth}" class="{$firstColStyle}" valign="top">
238
            Frequency</td><td width="{$secondColWidth}" class="{$secondColStyle}">
239
            <xsl:value-of select="./frequency"/></td></tr>
240
      </xsl:if>
241
      <xsl:for-each select="./temporalCov">
242
          <tr><td width="{$firstColWidth}" class="{$firstColStyle}" valign="top">
243
          Coverage</td><td width="{$secondColWidth}" class="{$secondColStyle}">
244
          <table width="100%">
245
            <xsl:apply-templates select="."/>
246
          </table></td></tr>
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>
247 218
      </xsl:for-each>
248

  
249
      <xsl:for-each select="./paragraph">
250
          <xsl:if test="normalize-space(./paragraph)!=''">
251
            <tr><td width="{$firstColWidth}" class="{$firstColStyle}">
252
            Additional Info:</td><td width="{$secondColWidth}" class="{$secondColStyle}">
253
            <xsl:value-of select="./paragraph"/></td></tr>
254
          </xsl:if>
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>
255 228
      </xsl:for-each>
256
      <xsl:for-each select="./citation">
257
          <tr><td width="{$firstColWidth}" class="{$firstColStyle}" valign="top">
258
          Literature Citation</td><td width="{$secondColWidth}" class="{$secondColStyle}">
259
          <table width="100%">
260
            <xsl:apply-templates select="."/>
261
          </table></td></tr>
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>
262 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>
263 257
  </xsl:template>
264 258

  
265

  
266
  <xsl:template match="researchProject" mode="recursive">
267
      <xsl:for-each select="../researchProject">
268
        <tr><td width="{$firstColWidth}" class="{$firstColStyle}" valign="top">
269
        Additional Project:</td><td width="{$secondColWidth}" class="{$secondColStyle}">
270
        <table width="100%">
271
        <xsl:apply-templates select="."/>
272
        </table></td></tr>
273
      </xsl:for-each>
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>
274 278
  </xsl:template>
279
 
275 280

  
276

  
277

  
278
<!-- these are elements we need to suppress (they are displayed by templates without a "mode=" parameter) -->
279

  
280
   <xsl:template match="//personnel" mode="resource"/>
281

  
282

  
283

  
284 281
</xsl:stylesheet>

Also available in: Unified diff