Project

General

Profile

« Previous | Next » 

Revision 553

Added by Jing Tao about 24 years ago

Add the eml style sheet into metacat module.

View differences:

lib/style/eml2/eml-attribute-2.0.0.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *    Copyright: 2000 Regents of the University of California and the
5
  *               National Center for Ecological Analysis and Synthesis
6
  *  For Details: http://www.nceas.ucsb.edu/
7
  *
8
  *   '$Author$'
9
  *     '$Date$'
10
  * '$Revision$'
11
  *
12
  * This program is free software; you can redistribute it and/or modify
13
  * it under the terms of the GNU General Public License as published by
14
  * the Free Software Foundation; either version 2 of the License, or
15
  * (at your option) any later version.
16
  *
17
  * This program is distributed in the hope that it will be useful,
18
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
  * GNU General Public License for more details.
21
  *
22
  * You should have received a copy of the GNU General Public License
23
  * along with this program; if not, write to the Free Software
24
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
25
  *
26
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
27
  * convert an XML file that is valid with respect to the eml-variable.dtd
28
  * module of the Ecological Metadata Language (EML) into an HTML format
29
  * suitable for rendering with modern web browsers.
30
-->
31
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
32
<!-- IMPORTANT: IMPORT EML-RESOURCE *AFTER* EML-COVERAGE!!! -->
33
<xsl:import href="eml-settings-2.0.0beta6-@name@.xsl" />
34
<xsl:import href="eml-identifier-2.0.0beta6-@name@.xsl" />
35

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

  
38
<xsl:template match="/">
39
<!-- BEGIN @header-subtitle@ PAGE TOP HTML -->
40
<html>
41
<!--
42
      '$RCSfile$'
43
       Copyright: 2001 Regents of the University of California and the
44
                 @header-title@ LTER
45
      '$Author$'
46
      '$Date$'
47
      '$Revision$'
48
-->
49
    <head>
50
      <title>@header-title@ LTER</title>
51
      <link rel="stylesheet" type="text/css"
52
            href="@style-path@/@name@.css" />
53
      <style type="text/css">
54
          @import url(@style-path@/@header-subtitle@-advanced.css);
55
      </style>
56
        <script language="JavaScript">
57
         <![CDATA[
58
          function submitform(action,form_ref) {
59
            form_ref.action.value=action;
60
            form_ref.abstractpath.value="";
61
            form_ref.qformat.value="@header-subtitle@";
62
            form_ref.submit();
63
            }
64
          function submitform1(action, abstractpath, form_ref) {
65
            form_ref.action.value=action;
66
            form_ref.abstractpath.value=abstractpath;
67
            form_ref.qformat.value="";
68
            form_ref.submit();
69
            }
70
          function submitform2(action, qformat, form_ref) {
71
            form_ref.action.value=action;
72
            form_ref.qformat.value=qformat;
73
            form_ref.abstractpath.value="";
74
            form_ref.submit();
75
            }
76
    function openWindow(request)
77
          {
78
                window.open(request,"attr");
79
          }
80
        ]]>
81
      </script>
82
    </head>
83
    <body>
84
      <!--<div class="header-logo">
85
        <img src="/catalog/img/catalog/@header-subtitle@-logo.gif" alt="SBC LTER" border="0" />
86
      </div>-->
87
      <div class="spacing" align="center">
88
        <table cellspacing="0" width="100%" border="0">
89
          <tr>
90
            <td class="header-title">
91
              <div class="header-title">
92
                @header-title@
93
              </div>
94
               <div class="header-subtitle">
95
                @header-subtitle@
96
              </div>
97
            </td>
98
            <td class="header-image" rowspan="1">
99
              <div class="header-image">
100
                <img class="header" src="@html-path@/@header-image@"
101
                  alt="@header-image-alt@"
102
                   border="0" />
103
              </div>
104
            </td>
105
          </tr>
106
          <tr>
107
            <td class="header-menu" colspan="2">
108
              <div class="header-menu">
109
                @header-menu@
110
              </div>
111
            </td>
112
          </tr>
113
          <tr>
114
            <td class="header-submenu" colspan="2">
115
              <div class="header-submenu">
116
                &#160; <!-- &nbsp; that is XML compliant -->
117
              </div>
118
            </td>
119
          </tr>
120
        </table>
121
      </div>
122
      <div class="content-spacing" align="center">
123
        <table cellspacing="0" width="100%" height="100%" border="0">
124
          <tr>
125
            <td class="content-area" colspan="2">
126
            <!-- END @header-subtitle@ PAGE TOP HTML -->
127
             <div class="content-area">
128
  <table width="85%">
129
  <tr><td class="tablehead"> Attribute Definitions</td></tr><tr></tr>
130
  <tr><td>
131
        <table class="border1" cellspacing="0">
132
  <!-- width needed for NN4 - doesn't recognize width in css -->
133

  
134
        <tr><th colspan="1" valign="center" align="center" class="bordered">Columns</th>
135

  
136
  <xsl:for-each select="eml-attribute/attribute">
137
   <th colspan="1" align="center"  class="bordered"><xsl:value-of select="attributeName"/></th>
138
  </xsl:for-each>
139
  </tr>
140
  <tr><th colspan="1" align="center"  class="bordered" >Label(s) of the Column</th>
141
        <xsl:for-each select="eml-attribute/attribute">
142
      <xsl:variable name="stripes">
143
              <xsl:choose>
144
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
145
                <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
146
              </xsl:choose>
147
            </xsl:variable>
148
    <td colspan="1" align="center" class="{$stripes}">
149
    <xsl:for-each select="attributeLabel">
150
      <xsl:value-of select="."/>
151
      &#160;<br />
152
    </xsl:for-each>
153
    </td>
154
  </xsl:for-each>
155
  </tr>
156
  <tr><th colspan="1" align="center"  class="bordered">Meaning</th>
157

  
158
  <xsl:for-each select="eml-attribute/attribute">
159
      <xsl:variable name="stripes">
160
              <xsl:choose>
161
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
162
                <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
163
              </xsl:choose>
164
            </xsl:variable>
165
    <td colspan="1" align="center" class="{$stripes}">
166
      <xsl:value-of select="attributeDefinition"/>
167
    </td>
168
  </xsl:for-each>
169
  </tr>
170

  
171
  <tr><th colspan="1" align="center"  class="bordered">Unit</th>
172
        <xsl:for-each select="eml-attribute/attribute">
173
    <xsl:variable name="stripes">
174
              <xsl:choose>
175
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
176
                <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
177
              </xsl:choose>
178
            </xsl:variable>
179
    <td colspan="1" align="center" class="{$stripes}">
180
      <xsl:value-of select="unit"/>
181
    </td>
182
  </xsl:for-each>
183
  </tr>
184

  
185
  <tr><th colspan="1" align="center"  class="bordered">Type of Value</th>
186
        <xsl:for-each select="eml-attribute/attribute">
187
  <xsl:variable name="stripes">
188
              <xsl:choose>
189
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
190
                <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
191
              </xsl:choose>
192
            </xsl:variable>
193
    <td colspan="1" align="center" class="{$stripes}">
194
      <xsl:value-of select="dataType"/>
195
    </td>
196
  </xsl:for-each>
197
  </tr>
198

  
199
  <tr><th colspan="1" align="center"  class="bordered">Missing Value Code</th>
200
        <xsl:for-each select="eml-attribute/attribute">
201
     <xsl:variable name="stripes">
202
              <xsl:choose>
203
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
204
                <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
205
              </xsl:choose>
206
            </xsl:variable>
207
    <td colspan="1" align="center" class="{$stripes}">
208
      <xsl:for-each select="missingValueCode">
209
      <xsl:value-of select="."/>
210
      </xsl:for-each>
211
    </td>
212
  </xsl:for-each>
213
  </tr>
214

  
215
  <tr><th colspan="1" align="center"  class="bordered">Precision &#160;</th>
216
        <xsl:for-each select="eml-attribute/attribute">
217
      <xsl:variable name="stripes">
218
              <xsl:choose>
219
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
220
                <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
221
              </xsl:choose>
222
            </xsl:variable>
223
    <td colspan="1" align="center" class="{$stripes}">
224
      <xsl:value-of select="precision"/>&#160;
225
    </td>
226
  </xsl:for-each>
227
  </tr>
228

  
229
  <tr valign="middle"><th align="center" valign="middle"  class="bordered" >Allowed Values</th>
230
    <xsl:for-each select="eml-attribute/attribute">
231
       <xsl:variable name="stripes">
232
              <xsl:choose>
233
                <xsl:when test="position() mod 2 = 1">colodd</xsl:when>
234
                <xsl:when test="position() mod 2 = 0">coleven</xsl:when>
235
              </xsl:choose>
236
            </xsl:variable>
237
     <td class="{$stripes}">
238
     <xsl:for-each select="attributeDomain">
239
      <table width="100%" border="0" cols="2">
240
    <xsl:if test="count(enumeratedDomain) > 0">
241
    <tr><td colspan="2" align="center" width="100%"><u>List of Values</u></td></tr>
242
    <tr><td valign="center" align="center" colspan="2">
243
    <select class="{$stripes}">
244
    <option>--Select code--</option>
245
    <xsl:for-each select="enumeratedDomain">
246
      <xsl:variable name="id1">
247
      <xsl:value-of select="//identifier"/>
248
      </xsl:variable>
249
       <option onClick="openWindow('http://@server@/@context@/servlet/metacat?action=read&amp;qformat=@name@-enumeratedDomain&amp;docid={$id1}')">
250
                <xsl:value-of select="code"/>&#160;
251
       </option>
252
          </xsl:for-each>
253
    </select>
254
    </td></tr>
255
    </xsl:if>
256
    <xsl:if test="count(textDomain) > 0">
257
      <tr><td align="center" colspan="2"><u>Text Patterns</u></td></tr>
258
      <tr><td valign="center" align="center" colspan="2">
259
    <select class="{$stripes}">
260
    <option>--Select code--</option>
261
                <xsl:for-each select="textDomain">
262
      <xsl:variable name="id1">
263
      <xsl:value-of select="//identifier"/>
264
      </xsl:variable>
265
       <option onClick="openWindow('http://@server@/@context@/servlet/metacat?action=read&amp;qformat=@name@-enumeratedDomain&amp;docid={$id1}')">
266
      <xsl:value-of select="definition"/>&#160;
267
     </option>
268
                </xsl:for-each>
269
    </select>
270
    </td></tr>
271
    </xsl:if>
272
    <xsl:if test="count(numericDomain) > 0">
273
      <tr><td align="center" colspan="2"><u>Numeric</u></td></tr>
274
      <tr><td align="center">min:</td><td align="center">max:</td></tr>
275
    </xsl:if>
276
                <xsl:for-each select="numericDomain">
277
        <xsl:apply-templates select="."/>
278
                </xsl:for-each>
279
    </table>
280

  
281
    </xsl:for-each>
282
    </td>
283
   </xsl:for-each>
284
  </tr>
285

  
286
        </table>
287
  </td>
288
  </tr>
289
  </table>
290
        </div>
291
        </td>
292
        </tr>
293
          <tr>
294
            <td colspan="2">
295
              <!--div class="nsf" >This material is based on the upon work
296
              supported by the National Science Foundation under Cooperative
297
              Agreement #OCE-9982105. Any opinions, findings, or recommendations
298
              expressed in the material are those of author(s) and do not
299
              necessarily reflect the view of the National Science Foundation.
300
              </div-->
301
            </td>
302
          </tr>
303
          <tr>
304
            <td class="footer-menu" colspan="2">
305
              <div class="footer-menu">
306
                @footer-menu@
307
              </div>
308
            </td>
309
          </tr>
310
          <tr>
311
            <td class="footer-left">
312
              <div class="footer-left">
313
                @copyright@
314
              </div>
315
            </td>
316
            <td class="footer-right">
317
              <div class="footer-right">
318
               Contact: <a class="footer-link"
319
                        href="mailto:@mailto-address@">
320
                        @mailto-address@
321
                        </a> |
322
                <a class="footer-link"
323
                   href="@intranet-address@"
324
                   target="offline">Internal Login
325
                </a>
326
              </div>
327
            </td>
328
          </tr>
329
        </table>
330
      </div>
331
    </body>
332
  </html>
333
  </xsl:template>
334

  
335

  
336
  <xsl:template match="numericDomain">
337
      <tr><td align="center"><xsl:value-of select="minimum"/></td>
338
          <td align="center"><xsl:value-of select="maximum"/></td></tr>
339
  </xsl:template>
340

  
341
</xsl:stylesheet>
0 342

  
lib/style/eml2/generic.xsl
1
<?xml version="1.0"?> 
2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3

  
4
  <xsl:template match="/">
5
       <table border="1" cellpadding="5">
6
         <tr><td><B>Element Name</B></td><td><B>Value</B></td></tr> 
7
        <xsl:apply-templates />   
8
      </table>
9
  </xsl:template>
10

  
11
  <xsl:template match="*">
12
    <xsl:for-each select="./*">
13
        <tr><td><xsl:value-of select="local-name()"/></td>
14
            <td><xsl:value-of select="."/></td></tr>
15
    </xsl:for-each>
16
  </xsl:template>
17

  
18
</xsl:stylesheet>
0 19

  
lib/style/eml2/eml-project-2.0.0.xsl
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$'
10
  *     '$Date$'
11
  * '$Revision$'
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:import href="eml-protocol-2.0.0beta6-@name@.xsl"/>
35
<xsl:import href="eml-coverage-2.0.0beta6-@name@.xsl"/>
36

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

  
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>
166
  </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"/>
181
  </xsl:template>
182

  
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"/>
187
  </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"/>
193
  </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>
202
  </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>
229
  </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>
247
      </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>
255
      </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>
262
      </xsl:for-each>
263
  </xsl:template>
264

  
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>
274
  </xsl:template>
275

  
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
</xsl:stylesheet>
0 285

  
lib/style/eml2/ascii-treeview.xsl
1
<?xml version="1.0" encoding="utf-8"?>
2
<!--
3

  
4
ASCII XML Tree Viewer 1.0 (13 Feb 2001)
5
An XPath/XSLT visualisation tool for XML documents
6

  
7
Written by Jeni Tennison and Mike J. Brown
8
No license; use freely, but please credit the authors if republishing elsewhere.
9

  
10
Use this stylesheet to produce an ASCII art representation of an XML document's
11
node tree, as exposed by the XML parser and interpreted by the XSLT processor.
12
Note that the parser may not expose comments to the XSLT processor.
13

  
14
Usage notes
15
===========
16

  
17
By default, this stylesheet will not show namespace nodes. If the XSLT processor
18
supports the namespace axis and you want to see namespace nodes, just pass a
19
non-empty "show_ns" parameter to the stylesheet. Example using Instant Saxon:
20

  
21
    saxon somefile.xml ascii-treeview.xsl show_ns=yes
22

  
23
If you want to ignore whitespace-only text nodes, uncomment the xsl:strip-space
24
instruction below.
25

  
26
-->
27
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
28

  
29
<xsl:output method="html" />
30

  
31
<!-- uncomment the following to ignore whitespace-only text nodes -->
32
<!-- xsl:strip-space elements="*" -->
33

  
34
<!-- pass a non-empty show_ns parameter to the stylesheet to show namespace nodes -->
35
<xsl:param name="show_ns"/>
36

  
37
<xsl:variable name="apos">'</xsl:variable>
38

  
39
<xsl:template match="/">
40
    <xsl:apply-templates select="." mode="ascii-art" />
41
</xsl:template>
42

  
43
<xsl:template match="/" mode="ascii-art">
44
    <html><body><pre>
45
    <xsl:text>root&#xA;</xsl:text>
46
    <xsl:apply-templates mode="ascii-art" />
47
    </pre></body></html>
48
</xsl:template>
49

  
50
<xsl:template match="*" mode="ascii-art">
51
    <xsl:call-template name="ascii-art-hierarchy" />
52
    <xsl:text />___element '<xsl:value-of select="local-name()" />'<xsl:text />
53
    <xsl:if test="namespace-uri()"> in ns '<xsl:value-of select="namespace-uri()"/>' ('<xsl:value-of select="name()"/>')</xsl:if>
54
    <xsl:text>&#xA;</xsl:text>
55
    <xsl:apply-templates select="@*" mode="ascii-art" />
56
    <xsl:if test="$show_ns">
57
         <xsl:for-each select="namespace::*">
58
             <xsl:call-template name="ascii-art-hierarchy" />
59
             <xsl:text />  \___namespace '<xsl:value-of select="name()" />' = '<xsl:value-of select="." />'&#xA;<xsl:text />
60
         </xsl:for-each>
61
    </xsl:if>
62
    <xsl:apply-templates mode="ascii-art" />
63
</xsl:template>
64

  
65
<xsl:template match="@*" mode="ascii-art">
66
    <xsl:call-template name="ascii-art-hierarchy" />
67
    <xsl:text />  \___attribute '<xsl:value-of select="local-name()" />'<xsl:text />
68
    <xsl:if test="namespace-uri()"> in ns '<xsl:value-of select="namespace-uri()"/>' ('<xsl:value-of select="name()"/>')</xsl:if>
69
    <xsl:text /> = '<xsl:text />
70
    <xsl:call-template name="escape-ws">
71
        <xsl:with-param name="text" select="." />
72
    </xsl:call-template>
73
    <xsl:text />'&#xA;<xsl:text />
74
</xsl:template>
75

  
76
<xsl:template match="text()" mode="ascii-art">
77
    <xsl:call-template name="ascii-art-hierarchy" />
78
    <xsl:text>___text '</xsl:text>
79
    <xsl:call-template name="escape-ws">
80
        <xsl:with-param name="text" select="." />
81
    </xsl:call-template>
82
    <xsl:text>'&#xA;</xsl:text>
83
</xsl:template>
84

  
85
<xsl:template match="comment()" mode="ascii-art">
86
    <xsl:call-template name="ascii-art-hierarchy" />
87
    <xsl:text />___comment '<xsl:value-of select="." />'&#xA;<xsl:text />
88
</xsl:template>
89

  
90
<xsl:template match="processing-instruction()" mode="ascii-art">
91
    <xsl:call-template name="ascii-art-hierarchy" />
92
    <xsl:text />___processing instruction target='<xsl:value-of select="name()" />' instruction='<xsl:value-of select="." />'&#xA;<xsl:text />
93
</xsl:template>
94

  
95
<xsl:template name="ascii-art-hierarchy">
96
    <xsl:for-each select="ancestor::*">
97
        <xsl:choose>
98
            <xsl:when test="following-sibling::node()">  |   </xsl:when>
99
            <xsl:otherwise><xsl:text>      </xsl:text></xsl:otherwise>
100
        </xsl:choose>
101
    </xsl:for-each>
102
    <xsl:choose>
103
        <xsl:when test="parent::node() and ../child::node()">  |</xsl:when>
104
        <xsl:otherwise><xsl:text>   </xsl:text></xsl:otherwise>
105
    </xsl:choose>
106
</xsl:template>
107

  
108
<!-- recursive template to escape backslashes, apostrophes, newlines and tabs -->
109
<xsl:template name="escape-ws">
110
    <xsl:param name="text" />
111
    <xsl:choose>
112
        <xsl:when test="contains($text, '\')">
113
            <xsl:call-template name="escape-ws">
114
                <xsl:with-param name="text" select="substring-before($text, '\')" />
115
            </xsl:call-template>
116
            <xsl:text>\\</xsl:text>
117
            <xsl:call-template name="escape-ws">
118
                <xsl:with-param name="text" select="substring-after($text, '\')" />
119
            </xsl:call-template>
120
        </xsl:when>
121
        <xsl:when test="contains($text, $apos)">
122
            <xsl:call-template name="escape-ws">
123
                <xsl:with-param name="text" select="substring-before($text, $apos)" />
124
            </xsl:call-template>
125
            <xsl:text>\'</xsl:text>
126
            <xsl:call-template name="escape-ws">
127
                <xsl:with-param name="text" select="substring-after($text, $apos)" />
128
            </xsl:call-template>
129
        </xsl:when>
130
        <xsl:when test="contains($text, '&#xA;')">
131
            <xsl:call-template name="escape-ws">
132
                <xsl:with-param name="text" select="substring-before($text, '&#xA;')" />
133
            </xsl:call-template>
134
            <xsl:text>\n</xsl:text>
135
            <xsl:call-template name="escape-ws">
136
                <xsl:with-param name="text" select="substring-after($text, '&#xA;')" />
137
            </xsl:call-template>
138
        </xsl:when>
139
        <xsl:when test="contains($text, '&#x9;')">
140
            <xsl:value-of select="substring-before($text, '&#x9;')" />
141
            <xsl:text>\t</xsl:text>
142
            <xsl:call-template name="escape-ws">
143
                <xsl:with-param name="text" select="substring-after($text, '&#x9;')" />
144
            </xsl:call-template>
145
        </xsl:when>
146
        <xsl:otherwise><xsl:value-of select="$text" /></xsl:otherwise>
147
    </xsl:choose>
148
</xsl:template>
149

  
150
</xsl:stylesheet>
0 151

  
lib/style/eml2/eml-entity-2.0.0.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Jivka Bojilova
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$'
10
  *     '$Date$'
11
  * '$Revision$'
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-file.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
  <xsl:import href="eml-identifier-2.0.0beta6-@name@.xsl" />
34
  <xsl:import href="eml-coverage-2.0.0beta6-@name@.xsl" />
35

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

  
38
  <xsl:template match="/">
39
  <html>
40
    <head>
41
        <link rel="stylesheet" type="text/css" href="{$stylePath}/@name@.css" />
42
      <style type="text/css">
43
        @import url(@style-path@/sbclter-advanced.css);
44
      </style>
45
        <script language="JavaScript">
46
          <![CDATA[
47
          function submitform(action,form_ref) {
48
              form_ref.action.value=action;
49
              form_ref.abstractpath.value="";
50
              form_ref.qformat.value="sbclter";
51
              form_ref.submit();
52
          }
53
          function submitform1(action, abstractpath, form_ref) {
54
              form_ref.action.value=action;
55
              form_ref.abstractpath.value=abstractpath;
56
              form_ref.qformat.value="";
57
              form_ref.submit();
58
          }
59
          function submitform2(action, qformat, form_ref) {
60
              form_ref.action.value=action;
61
              form_ref.qformat.value=qformat;
62
              form_ref.abstractpath.value="";
63
              form_ref.submit();
64
          }
65
          ]]>
66
        </script>
67
    </head>
68

  
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>Table structure description</h1>
116
                 <!--h3>Ecological Metadata Language</h3-->
117
               </center>
118
               <table class="tabledefault" width="100%">
119
               <!-- width needed for NN4 - doesn't recognize width in css -->
120
                 <!--xsl:apply-templates select="table-entity/identifier" mode="resource"/-->
121
                 <tr class="{$subHeaderStyle}">
122
                   <td class="{$subHeaderStyle}" colspan="2">Table Information:</td>
123
                 </tr>
124
                 <xsl:apply-templates select="table-entity/entityName"/>
125
                 <xsl:apply-templates select="table-entity/entityDescription"/>
126
                 <xsl:apply-templates select="table-entity/caseSensitive"/>
127
                 <xsl:apply-templates select="table-entity/numberOfRecords"/>
128
                 <xsl:apply-templates select="table-entity/orientation"/>
129
                 <xsl:if test="table-entity/temporalCov">
130
                   <xsl:apply-templates select="table-entity/temporalCov"/>
131
                 </xsl:if>
132
                 <xsl:if test="table-entity/geographicCov">
133
                   <xsl:apply-templates select="table-entity/geographicCov"/>
134
                 </xsl:if>
135
                 <xsl:if test="table-entity/taxonomicCov">
136
                   <xsl:apply-templates select="table-entity/taxonomicCov"/>
137
                 </xsl:if>
138
               </table>
139
             </div>
140
           </td>
141
          </tr>
142
         <tr>
143
            <td colspan="2">
144
              <!--div class="nsf" >This material is based on the upon work
145
              supported by the National Science Foundation under Cooperative
146
              Agreement #OCE-9982105. Any opinions, findings, or recommendations
147
              expressed in the material are those of author(s) and do not
148
              necessarily reflect the view of the National Science Foundation.
149
              </div-->
150
            </td>
151
          </tr>
152
          <tr>
153
            <td class="footer-menu" colspan="2">
154
              <div class="footer-menu">
155
                @footer-menu@
156
              </div>
157
            </td>
158
          </tr>
159
          <tr>
160
            <td class="footer-left">
161
              <div class="footer-left">
162
                @copyright@
163
              </div>
164
            </td>
165
            <td class="footer-right">
166
              <div class="footer-right">
167
               Contact: <a class="footer-link"
168
                        href="@mailto-address@">
169
                        @header-subtitle@data@nceas.ucsb.edu
170
                        </a> |
171
                <a class="footer-link"
172
                   href="@intranet-address@"
173
                   target="offline">Internal Login
174
                </a>
175
              </div>
176
            </td>
177
          </tr>
178
        </table>
179
      </div>
180
    </body>
181
    </html>
182
  </xsl:template>
183

  
184
  <xsl:template match="entityName">
185
    <tr><td width="{$firstColWidth}" class="{$firstColStyle}">
186
    Name:</td><td width="{$secondColWidth}" class="{$secondColStyle}">
187
    <b><xsl:value-of select="."/></b></td></tr>
188
  </xsl:template>
189

  
190
  <xsl:template match="entityDescription">
191
        <xsl:if test="../entityDescription and normalize-space(../entityDescription)!=''">
192
            <tr><td width="{$firstColWidth}" class="{$firstColStyle}">
193
            Description:</td><td width="{$secondColWidth}" class="{$secondColStyle}">
194
            <xsl:value-of select="."/></td></tr>
195
        </xsl:if>
196
  </xsl:template>
197

  
198
  <xsl:template match="caseSensitive">
199
        <xsl:if test="../caseSensitive and normalize-space(../caseSensitive/@yesorno)!=''">
200
            <tr><td width="{$firstColWidth}" class="{$firstColStyle}">
201
            Case Sensitive?:</td><td width="{$secondColWidth}" class="{$secondColStyle}">
202
            <xsl:value-of select="./@yesorno"/></td></tr>
203
        </xsl:if>
204
  </xsl:template>
205

  
206
  <xsl:template match="numberOfRecords">
207
        <xsl:if test="../numberOfRecords and normalize-space(../numberOfRecords)!=''">
208
            <tr><td width="{$firstColWidth}" class="{$firstColStyle}">
209
            Number Of Records:</td><td width="{$secondColWidth}" class="{$secondColStyle}">
210
            <xsl:value-of select="."/></td></tr>
211
        </xsl:if>
212
  </xsl:template>
213

  
214
  <xsl:template match="orientation">
215
    <xsl:if test="(../orientation)">
216
      <tr><td width="{$firstColWidth}" class="{$firstColStyle}">
217
          Orientation:</td><td width="{$secondColWidth}" class="{$secondColStyle}">
218
      <xsl:if test="normalize-space(@columnorrow)='columnmajor'">
219
        <xsl:text>Column-major</xsl:text>
220
      </xsl:if>
221
      <xsl:if test="normalize-space(@columnorrow)='rownmajor'">
222
        <xsl:text>Row-major</xsl:text>
223
      </xsl:if></td></tr>
224
    </xsl:if>
225
  </xsl:template>
226

  
227
</xsl:stylesheet>
0 228

  
lib/style/eml2/eml-physical-2.0.0.xsl
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$'
10
  *     '$Date$'
11
  * '$Revision$'
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
<!-- IMPORTANT: IMPORT EML-RESOURCE *AFTER* EML-COVERAGE!!! -->
34
<xsl:import href="eml-settings-2.0.0beta6-@name@.xsl" />
35
<xsl:import href="eml-identifier-2.0.0beta6-@name@.xsl" />
36

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

  
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>Physical Structure 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-physical/identifier"
121
mode="resource"/-->
122
                <tr>
123
                  <td class="tablehead" colspan="2">Physical Structure:</td>
124
                </tr>
125
                <xsl:apply-templates select="eml-physical/*"/>
126
              </table>
127
            </div>
128
           </td>
129
          </tr>
130
          <tr>
131
            <td colspan="2">
132
              <!--div class="nsf" >This material is based on the upon work
133
              supported by the National Science Foundation under Cooperative
134
              Agreement #OCE-9982105. Any opinions, findings, or recommendations
135
              expressed in the material are those of author(s) and do not
136
              necessarily reflect the view of the National Science Foundation.
137
              </div-->
138
            </td>
139
          </tr>
140
          <tr>
141
            <td class="footer-menu" colspan="2">
142
              <div class="footer-menu">
143
                @footer-menu@
144
              </div>
145
            </td>
146
          </tr>
147
          <tr>
148
            <td class="footer-left">
149
              <div class="footer-left">
150
                @copyright@
151
              </div>
152
            </td>
153
            <td class="footer-right">
154
              <div class="footer-right">
155
               Contact: <a class="footer-link"
156
                        href="@mailto-address@">
157
                        @header-subtitle@data@nceas.ucsb.edu
158
                        </a> |
159
                <a class="footer-link"
160
                   href="@intranet-address@"
161
                   target="offline">Internal Login
162
                </a>
163
              </div>
164
            </td>
165
          </tr>
166
  </table>
167
      </div>
168
     </body>
169
    </html>
170
  </xsl:template>
171

  
172

  
173
  <xsl:template match="format">
174
        <tr>
175
        <td class="{$firstColStyle}" width="{$firstColWidth}">File Format</td>
176
        <td class="{$secondColStyle}" width="{$secondColWidth}"><xsl:value-of select="."/></td>
177
        </tr>
178
  </xsl:template>
179

  
180
  <xsl:template match="characterEncoding">
181
        <tr>
182
        <td class="{$firstColStyle}" width="{$firstColWidth}">Character Encoding</td>
183
        <td class="{$secondColStyle}" width="{$secondColWidth}"><xsl:value-of select="."/></td>
184
        </tr>
185
  </xsl:template>
186

  
187
  <xsl:template match="size">
188
        <tr>
189
        <td class="{$firstColStyle}" width="{$firstColWidth}">Size</td>
190
        <td class="{$secondColStyle}" width="{$secondColWidth}"><xsl:value-of select="."/>
191
        <xsl:if test="normalize-space(./@units)!=''">
192
            ( <xsl:value-of select="./@units"/> )
193
        </xsl:if></td>
194
        </tr>
195
  </xsl:template>
196

  
197
  <xsl:template match="authentication">
198
        <tr>
199
        <td class="{$firstColStyle}" width="{$firstColWidth}">Authentication (checksum value &amp; method)</td>
200
        <td class="{$secondColStyle}" width="{$secondColWidth}">
201
        <xsl:value-of select="."/> (method: <xsl:value-of select="./@method"/>)</td></tr>
202
  </xsl:template>
203

  
204
  <xsl:template match="compressionMethod">
205
        <tr>
206
        <td class="{$firstColStyle}" width="{$firstColWidth}">Compression Method</td>
207
        <td class="{$secondColStyle}" width="{$secondColWidth}"><xsl:value-of select="."/></td>
208
        </tr>
209
  </xsl:template>
210

  
211
  <xsl:template match="encodingMethod">
212
        <tr>
213
        <td class="{$firstColStyle}" width="{$firstColWidth}">Encoding Method</td>
214
        <td class="{$secondColStyle}" width="{$secondColWidth}"><xsl:value-of select="."/></td>
215
        </tr>
216
  </xsl:template>
217

  
218
  <xsl:template match="numHeaderLines">
219
        <tr>
220
        <td class="{$firstColStyle}" width="{$firstColWidth}">Number of Header Lines</td>
221
        <td class="{$secondColStyle}" width="{$secondColWidth}"><xsl:value-of select="."/></td>
222
        </tr>
223
  </xsl:template>
224

  
225
  <xsl:template match="recordDelimiter">
226
        <tr>
227
        <td class="{$firstColStyle}" width="{$firstColWidth}">Record Delimiter</td>
228
        <td class="{$secondColStyle}" width="{$secondColWidth}"><xsl:value-of select="."/></td>
229
        </tr>
230
  </xsl:template>
231

  
232
  <xsl:template match="maxRecordLength">
233
        <tr>
234
        <td class="{$firstColStyle}" width="{$firstColWidth}">Maximum Record Length</td>
235
        <td class="{$secondColStyle}" width="{$secondColWidth}"><xsl:value-of select="."/></td>
236
        </tr>
237
  </xsl:template>
238

  
239
  <xsl:template match="quoteCharacter">
240
        <tr>
241
        <td class="{$firstColStyle}" width="{$firstColWidth}">Quote Character</td>
242
        <td class="{$secondColStyle}" width="{$secondColWidth}"><xsl:value-of select="."/></td>
243
        </tr>
244
  </xsl:template>
245

  
246
   <xsl:template match="literalCharacter">
247
       <tr>
248
        <td class="{$firstColStyle}" width="{$firstColWidth}">Literal Character</td>
249
        <td class="{$secondColStyle}" width="{$secondColWidth}"><xsl:value-of select="."/></td>
250
        </tr>
251
  </xsl:template>
252

  
253
  <xsl:template match="fieldStartColumn">
254
        <tr>
255
        <td class="{$firstColStyle}" width="{$firstColWidth}">Field Start Column</td>
256
        <td class="{$secondColStyle}" width="{$secondColWidth}"><xsl:value-of select="."/></td>
257
        </tr>
258
  </xsl:template>
259

  
260

  
261
  <xsl:template match="fieldDelimiter">
262
        <tr>
263
        <td class="{$firstColStyle}" width="{$firstColWidth}">Field Delimeter</td>
264
        <td class="{$secondColStyle}" width="{$secondColWidth}"><xsl:value-of select="."/></td>
265
        </tr>
266
  </xsl:template>
267

  
268
  <xsl:template match="fieldWidth">
269
        <tr><td class="{$firstColStyle}" width="{$firstColWidth}">Field Width</td>
270
        <td class="{$secondColStyle}" width="{$secondColWidth}"><xsl:value-of select="."/></td>
271
        </tr>
272
  </xsl:template>
273

  
274
</xsl:stylesheet>
0 275

  
lib/style/eml2/eml-distribution-2.0.0.xsl
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$'
10
  *     '$Date$'
11
  * '$Revision$'
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
  <xsl:import href="eml-text-2.0.0.xsl" />
34
  <xsl:output method="html" encoding="iso-8859-1"/>
35

  
36

  
37
<!-- This module is for distribution and it is self-contained-->
38

  
39
  <xsl:template name="distribution">
40
      <xsl:param name="disfirstColStyle"/>
41
      <xsl:param name="dissubHeaderStyle"/>
42
      <table class="tabledefault" width="100%">
43
       <xsl:choose>
44
         <xsl:when test="references!=''">
45
          <xsl:variable name="ref_id" select="references"/>
46
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
47
          <xsl:for-each select="$references">
48
            <xsl:apply-templates select="online">
49
              <xsl:with-param name="dissubHeaderStyle" select="$dissubHeaderStyle"/>
50
              <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
51
            </xsl:apply-templates>
52
            <xsl:apply-templates select="offline">
53
              <xsl:with-param name="dissubHeaderStyle" select="$dissubHeaderStyle"/>
54
              <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
55
            </xsl:apply-templates>
56
            <xsl:apply-templates select="inline">
57
              <xsl:with-param name="dissubHeaderStyle" select="$dissubHeaderStyle"/>
58
              <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
59
            </xsl:apply-templates>
60
          </xsl:for-each>
61
        </xsl:when>
62
        <xsl:otherwise>
63
          <xsl:apply-templates select="online">
64
            <xsl:with-param name="dissubHeaderStyle" select="$dissubHeaderStyle"/>
65
            <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
66
          </xsl:apply-templates>
67
          <xsl:apply-templates select="offline">
68
            <xsl:with-param name="dissubHeaderStyle" select="$dissubHeaderStyle"/>
69
            <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
70
          </xsl:apply-templates>
71
          <xsl:apply-templates select="inline">
72
            <xsl:with-param name="dissubHeaderStyle" select="$dissubHeaderStyle"/>
73
            <xsl:with-param name="disfirstColStyle" select="$disfirstColStyle" />
74
          </xsl:apply-templates>
75
        </xsl:otherwise>
76
       </xsl:choose> 
77
      </table>
78
  </xsl:template>
79

  
80
  <!-- ********************************************************************* -->
81
  <!-- *******************************  Online data  *********************** -->
82
  <!-- ********************************************************************* -->
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff