Project

General

Profile

« Previous | Next » 

Revision 3094

I'm adding a set of EML XSL stylesheets that are separate but similar to those
found in the lib/style/common directory. I have created a directory called
'shared' (in libstyle) and put these modified stylesheets within it in order
to maintain backward compatibility with skins that were written previously
and that rely on the XSL stylesheets found in lib/style/common.

These style sheets originated from those developed by Matthew Brooke in 2004,
and are not complete. However, they represent an effort toward excising as
much of the styling information out of the XSL and putting it in the
accompanying CSS stylesheet. This includes moving from HTML-table based
layout to CSS-positioning layout. The intention was to enable data managers
to move blocks of metadata to locations in the resulting HTML document
that suits their needs, rather than displaying them solely in XML-document
order (i.e. first processed == first displayed).

View differences:

lib/style/shared/eml-2.0.0/eml-software.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Matt Jones
5
  *    Copyright: 2000 Regents of the University of California and the
6
  *               National Center for Ecological Analysis and Synthesis
7
  *  For Details: http://www.nceas.ucsb.edu/
8
  *
9
  *   '$Author$'
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-dataset.dtd
29
  * module of the Ecological Metadata Language (EML) into an HTML format
30
  * suitable for rendering with modern web browsers.
31
-->
32
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
33

  
34

  
35
  <xsl:output method="html" encoding="iso-8859-1"
36
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
37
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
38
              indent="yes" />  
39

  
40
  <xsl:template name="software">
41
    <xsl:param name="softwarefirstColStyle"/>
42
    <xsl:param name="softwaresubHeaderStyle"/>
43
    <table class="{$tabledefaultStyle}">
44
        <xsl:choose>
45
         <xsl:when test="references!=''">
46
          <xsl:variable name="ref_id" select="references"/>
47
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
48
          <xsl:for-each select="$references">
49
            <xsl:call-template name="softwarecommon">
50
              <xsl:with-param name="softwarefirstColStyle" select="$softwarefirstColStyle"/>
51
              <xsl:with-param name="softwaresubHeaderStyle" select="$softwaresubHeaderStyle"/>
52
            </xsl:call-template>
53
          </xsl:for-each>
54
        </xsl:when>
55
        <xsl:otherwise>
56
            <xsl:call-template name="softwarecommon">
57
              <xsl:with-param name="softwarefirstColStyle" select="$softwarefirstColStyle"/>
58
              <xsl:with-param name="softwaresubHeaderStyle" select="$softwaresubHeaderStyle"/>
59
            </xsl:call-template>
60
        </xsl:otherwise>
61
      </xsl:choose>
62
    </table>
63
  </xsl:template>
64

  
65
  <xsl:template name="softwarecommon">
66
        <xsl:param name="softwarefirstColStyle"/>
67
        <xsl:param name="softwaresubHeaderStyle"/>
68
        <tr><td class="{$softwaresubHeaderStyle}" colspan="2">
69
        <xsl:text>Software:</xsl:text></td></tr>
70
        <xsl:call-template name="resource">
71
           <xsl:with-param name="resfirstColStyle" select="$softwarefirstColStyle"/>
72
           <xsl:with-param name="ressubHeaderStyle" select="$softwaresubHeaderStyle"/>
73
           <xsl:with-param name="creator">Author(s):</xsl:with-param>
74
        </xsl:call-template>
75
        <xsl:call-template name="implementation">
76
           <xsl:with-param name="softwarefirstColStyle" select="$softwarefirstColStyle"/>
77
           <xsl:with-param name="softwaresubHeaderStyle" select="$softwaresubHeaderStyle"/>
78
        </xsl:call-template>
79
         <xsl:for-each select="dependency">
80
          <tr><td class="{$softwarefirstColStyle}">
81
                Dependency
82
                </td>
83
                <td class="{$secondColStyle}">
84
                 &#160;
85
                </td>
86
           </tr>
87
           <xsl:call-template name="dependency">
88
              <xsl:with-param name="softwarefirstColStyle" select="$softwarefirstColStyle"/>
89
              <xsl:with-param name="softwaresubHeaderStyle" select="$softwaresubHeaderStyle"/>
90
           </xsl:call-template>
91
        </xsl:for-each>
92
        <xsl:call-template name="licenseURL">
93
              <xsl:with-param name="softwarefirstColStyle" select="$softwarefirstColStyle"/>
94
              <xsl:with-param name="softwaresubHeaderStyle" select="$softwaresubHeaderStyle"/>
95
        </xsl:call-template>
96
        <xsl:call-template name="license">
97
              <xsl:with-param name="softwarefirstColStyle" select="$softwarefirstColStyle"/>
98
              <xsl:with-param name="softwaresubHeaderStyle" select="$softwaresubHeaderStyle"/>
99
        </xsl:call-template>
100
        <xsl:call-template name="version">
101
              <xsl:with-param name="softwarefirstColStyle" select="$softwarefirstColStyle"/>
102
              <xsl:with-param name="softwaresubHeaderStyle" select="$softwaresubHeaderStyle"/>
103
        </xsl:call-template>
104
        <xsl:call-template name="softwareAccess">
105
              <xsl:with-param name="softwarefirstColStyle" select="$softwarefirstColStyle"/>
106
              <xsl:with-param name="softwaresubHeaderStyle" select="$softwaresubHeaderStyle"/>
107
        </xsl:call-template>
108
        <xsl:call-template name="softwareProject">
109
              <xsl:with-param name="softwarefirstColStyle" select="$softwarefirstColStyle"/>
110
              <xsl:with-param name="softwaresubHeaderStyle" select="$softwaresubHeaderStyle"/>
111
        </xsl:call-template>
112
  </xsl:template>
113

  
114
  <xsl:template name="implementation">
115
     <xsl:param name="softwarefirstColStyle"/>
116
     <xsl:param name="softwaresubHeaderStyle"/>
117
     <xsl:for-each select="implementation">
118
        <tr><td colspan="2" class="{$softwaresubHeaderStyle}">
119
             Implementation Info:
120
            </td>
121
        </tr>
122
        <xsl:for-each select="distribution">
123
           <tr><td class="{$softwarefirstColStyle}">
124
             Distribution:
125
            </td>
126
            <td>
127
               <xsl:call-template name="distribution">
128
                 <xsl:with-param name="disfirstColStyle" select="$softwarefirstColStyle"/>
129
                 <xsl:with-param name="dissubHeaderStyle" select="$softwaresubHeaderStyle"/>
130
               </xsl:call-template>
131
            </td>
132
        </tr>
133
        </xsl:for-each>
134
        <xsl:for-each select="size">
135
           <tr><td class="{$softwarefirstColStyle}">
136
             Size:
137
            </td>
138
            <td class="{$secondColStyle}">
139
             <xsl:value-of select="."/>
140
            </td>
141
        </tr>
142
        </xsl:for-each>
143
        <xsl:for-each select="language">
144
           <tr><td class="{$softwarefirstColStyle}">
145
                Language:
146
                </td>
147
                <td class="{$secondColStyle}">
148
                  <xsl:value-of select="LanguageValue"/>
149
                </td>
150
           </tr>
151
           <xsl:if test="LanguageCodeStandard">
152
             <tr><td class="{$softwarefirstColStyle}">
153
                Language Code Standard:
154
                </td>
155
                <td class="{$secondColStyle}">
156
                  <xsl:value-of select="LanguageValue"/>
157
                </td>
158
             </tr>
159
           </xsl:if>
160
        </xsl:for-each>
161
        <xsl:for-each select="operatingSystem">
162
          <tr><td class="{$softwarefirstColStyle}">
163
                Operating System:
164
                </td>
165
                <td class="{$secondColStyle}">
166
                  <xsl:value-of select="."/>
167
                </td>
168
           </tr>
169
        </xsl:for-each>
170
        <xsl:for-each select="machineProcessor">
171
          <tr><td class="{$softwarefirstColStyle}">
172
                Operating System:
173
                </td>
174
                <td class="{$secondColStyle}">
175
                  <xsl:value-of select="."/>
176
                </td>
177
           </tr>
178
        </xsl:for-each>
179
        <xsl:for-each select="virtualMachine">
180
          <tr><td class="{$softwarefirstColStyle}">
181
                Virtual Machine:
182
                </td>
183
                <td class="{$secondColStyle}">
184
                  <xsl:value-of select="."/>
185
                </td>
186
           </tr>
187
        </xsl:for-each>
188
         <xsl:for-each select="diskUsage">
189
          <tr><td class="{$softwarefirstColStyle}">
190
                Disk Usage:
191
                </td>
192
                <td class="{$secondColStyle}">
193
                  <xsl:value-of select="."/>
194
                </td>
195
           </tr>
196
        </xsl:for-each>
197
        <xsl:for-each select="runtimeMemoryUsage">
198
          <tr><td class="{$softwarefirstColStyle}">
199
                Run Time Memory Usage:
200
                </td>
201
                <td class="{$secondColStyle}">
202
                  <xsl:value-of select="."/>
203
                </td>
204
           </tr>
205
        </xsl:for-each>
206
        <xsl:for-each select="programmingLanguage">
207
          <tr><td class="{$softwarefirstColStyle}">
208
                Programming Language:
209
                </td>
210
                <td class="{$secondColStyle}">
211
                  <xsl:value-of select="."/>
212
                </td>
213
           </tr>
214
        </xsl:for-each>
215
        <xsl:for-each select="checksum">
216
          <tr><td class="{$softwarefirstColStyle}">
217
                Check Sum:
218
                </td>
219
                <td class="{$secondColStyle}">
220
                  <xsl:value-of select="."/>
221
                </td>
222
           </tr>
223
        </xsl:for-each>
224
        <xsl:for-each select="dependency">
225
          <tr><td class="{$softwarefirstColStyle}">
226
                Dependency:
227
                </td>
228
                <td class="{$secondColStyle}">
229
                 &#160;
230
                </td>
231
           </tr>
232
           <xsl:call-template name="dependency">
233
              <xsl:with-param name="softwarefirstColStyle" select="$softwarefirstColStyle"/>
234
              <xsl:with-param name="softwaresubHeaderStyle" select="$softwaresubHeaderStyle"/>
235
           </xsl:call-template>
236
        </xsl:for-each>
237
     </xsl:for-each>
238
  </xsl:template>
239

  
240
  <xsl:template name="dependency">
241
    <xsl:param name="softwarefirstColStyle"/>
242
    <xsl:param name="softwaresubHeaderStyle"/>
243
    <xsl:for-each select="../dependency">
244
      <tr><td class="{$softwarefirstColStyle}">
245
           <b><xsl:value-of select="action"/></b> <xsl:text> Depend on</xsl:text>
246
        </td>
247
        <td>
248
            <xsl:for-each select="software">
249
               <xsl:call-template name="software">
250
                  <xsl:with-param name="softwarefirstColStyle" select="$softwarefirstColStyle"/>
251
                  <xsl:with-param name="softwaresubHeaderStyle" select="$softwaresubHeaderStyle"/>
252
               </xsl:call-template>
253
            </xsl:for-each>
254
        </td>
255
      </tr>
256
    </xsl:for-each>
257
  </xsl:template>
258

  
259
  <xsl:template name="version">
260
    <xsl:param name="softwarefirstColStyle"/>
261
    <xsl:for-each select="version">
262
        <tr><td class="{$firstColStyle}">
263
        Version Number:</td><td class="{$secondColStyle}">
264
        <xsl:value-of select="."/></td></tr>
265
    </xsl:for-each>
266
  </xsl:template>
267

  
268
  <xsl:template name="licenseURL">
269
    <xsl:param name="softwarefirstColStyle"/>
270
    <xsl:for-each select="licenseURL">
271
        <tr><td class="{$firstColStyle}">
272
            License URL:</td><td class="{$secondColStyle}">
273
        <xsl:value-of select="."/></td></tr>
274
    </xsl:for-each>
275
  </xsl:template>
276

  
277
  <xsl:template name="license">
278
    <xsl:param name="softwarefirstColStyle"/>
279
    <xsl:for-each select="license">
280
        <tr><td class="{$firstColStyle}">
281
            License:</td><td class="{$secondColStyle}">
282
        <xsl:value-of select="."/></td></tr>
283
    </xsl:for-each>
284
  </xsl:template>
285

  
286
  <xsl:template name="softwareAccess">
287
    <xsl:param name="softwarefirstColStyle"/>
288
    <xsl:param name="softwaresubHeaderStyle"/>
289
    <xsl:for-each select="access">
290
      <tr><td colspan="2">
291
         <xsl:call-template name="access">
292
           <xsl:with-param name="accessfirstColStyle" select="$softwarefirstColStyle"/>
293
           <xsl:with-param name="accesssubHeaderStyle" select="$softwaresubHeaderStyle"/>
294
         </xsl:call-template>
295
         </td>
296
       </tr>
297
    </xsl:for-each>
298
  </xsl:template>
299

  
300
  <xsl:template name="softwareProject">
301
    <xsl:param name="softwarefirstColStyle"/>
302
    <xsl:param name="softwaresubHeaderStyle"/>
303
    <xsl:for-each select="project">
304
      <tr><td class="{$softwaresubHeaderStyle}" colspan="2">
305
        <xsl:text>Project Info:</xsl:text></td></tr>
306
      <tr><td colspan="2">
307
        <xsl:call-template name="project">
308
          <xsl:with-param name="projectfirstColStyle" select="$softwarefirstColStyle"/>
309
          <xsl:with-param name="projectsubHeaderStyle" select="$softwaresubHeaderStyle"/>
310
        </xsl:call-template>
311
        </td>
312
      </tr>
313
    </xsl:for-each>
314
  </xsl:template>
315

  
316

  
317
</xsl:stylesheet>
0 318

  
lib/style/shared/eml-2.0.0/eml-party.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:output method="html" encoding="iso-8859-1"
35
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
36
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
37
              indent="yes" />  
38

  
39
  <!-- This module is for party member and it is self contained-->
40

  
41
  <xsl:template name="party">
42
      <xsl:param name="partyfirstColStyle"/>
43
      <table class="{$tabledefaultStyle}">
44
        <xsl:choose>
45
         <xsl:when test="references!=''">
46
          <xsl:variable name="ref_id" select="references"/>
47
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
48
          <xsl:for-each select="$references">
49
            <xsl:apply-templates mode="party">
50
             <xsl:with-param name="partyfirstColStyle" select="$partyfirstColStyle"/>
51
            </xsl:apply-templates>
52
          </xsl:for-each>
53
        </xsl:when>
54
        <xsl:otherwise>
55
          <xsl:apply-templates mode="party">
56
            <xsl:with-param name="partyfirstColStyle" select="$partyfirstColStyle"/>
57
          </xsl:apply-templates>
58
        </xsl:otherwise>
59
      </xsl:choose>
60
      </table>
61
  </xsl:template>
62

  
63
  <!-- *********************************************************************** -->
64

  
65

  
66
  <xsl:template match="individualName" mode="party">
67
      <xsl:param name="partyfirstColStyle"/>
68
      <xsl:if test="normalize-space(.)!=''">
69
        <tr><td class="{$partyfirstColStyle}" >
70
            Individual:</td><td class="{$secondColStyle}" >
71
           <b><xsl:value-of select="./salutation"/><xsl:text> </xsl:text>
72
           <xsl:value-of select="./givenName"/><xsl:text> </xsl:text>
73
           <xsl:value-of select="./surName"/></b>
74
        </td></tr>
75
      </xsl:if>
76
  </xsl:template>
77

  
78

  
79
  <xsl:template match="organizationName" mode="party">
80
      <xsl:param name="partyfirstColStyle"/>
81
      <xsl:if test="normalize-space(.)!=''">
82
        <tr><td class="{$partyfirstColStyle}" >
83
        Organization:</td><td class="{$secondColStyle}">
84
        <b><xsl:value-of select="."/></b>
85
        </td></tr>
86
      </xsl:if>
87
  </xsl:template>
88

  
89

  
90
  <xsl:template match="positionName" mode="party">
91
      <xsl:param name="partyfirstColStyle"/>
92
      <xsl:if test="normalize-space(.)!=''">
93
      <tr><td class="{$partyfirstColStyle}">
94
        Position:</td><td class="{$secondColStyle}">
95
        <xsl:value-of select="."/></td></tr>
96
      </xsl:if>
97
  </xsl:template>
98

  
99

  
100
  <xsl:template match="address" mode="party">
101
    <xsl:param name="partyfirstColStyle"/>
102
    <xsl:if test="normalize-space(.)!=''">
103
      <xsl:call-template name="addressCommon">
104
         <xsl:with-param name="partyfirstColStyle" select="$partyfirstColStyle"/>
105
      </xsl:call-template>
106
    </xsl:if>
107
    </xsl:template>
108

  
109
   <!-- This template will be call by other place-->
110
   <xsl:template name="address">
111
      <xsl:param name="partyfirstColStyle"/>
112
      <table class="{$tablepartyStyle}">
113
        <xsl:choose>
114
         <xsl:when test="references!=''">
115
          <xsl:variable name="ref_id" select="references"/>
116
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
117
          <xsl:for-each select="$references">
118
            <xsl:call-template name="addressCommon">
119
             <xsl:with-param name="partyfirstColStyle" select="$partyfirstColStyle"/>
120
            </xsl:call-template>
121
          </xsl:for-each>
122
        </xsl:when>
123
        <xsl:otherwise>
124
          <xsl:call-template name="addressCommon">
125
             <xsl:with-param name="partyfirstColStyle" select="$partyfirstColStyle"/>
126
          </xsl:call-template>
127
        </xsl:otherwise>
128
      </xsl:choose>
129
      </table>
130
  </xsl:template>
131

  
132
   <xsl:template name="addressCommon">
133
    <xsl:param name="partyfirstColStyle"/>
134
    <xsl:if test="normalize-space(.)!=''">
135
    <tr><td class="{$partyfirstColStyle}">
136
        Address:</td><td>
137
    <table class="{$tablepartyStyle}">
138
    <xsl:for-each select="deliveryPoint">
139
    <tr><td class="{$secondColStyle}"><xsl:value-of select="."/><xsl:text>, </xsl:text></td></tr>
140
    </xsl:for-each>
141
    <!-- only include comma if city exists... -->
142
    <tr><td class="{$secondColStyle}" >
143
    <xsl:if test="normalize-space(city)!=''">
144
        <xsl:value-of select="city"/><xsl:text>, </xsl:text>
145
    </xsl:if>
146
    <xsl:if test="normalize-space(administrativeArea)!='' or normalize-space(postalCode)!=''">
147
        <xsl:value-of select="administrativeArea"/><xsl:text> </xsl:text><xsl:value-of select="postalCode"/><xsl:text> </xsl:text>
148
    </xsl:if>
149
    <xsl:if test="normalize-space(country)!=''">
150
      <xsl:value-of select="country"/>
151
    </xsl:if></td></tr>
152
    </table></td></tr>
153
    </xsl:if>
154
   </xsl:template>
155

  
156
  <xsl:template match="phone" mode="party">
157
      <xsl:param name="partyfirstColStyle"/>
158
      <tr><td class="{$partyfirstColStyle}" >
159
             Phone:
160
          </td>
161
          <td>
162
            <table class="{$tablepartyStyle}">
163
              <tr><td class="{$secondColStyle}">
164
                     <xsl:value-of select="."/>
165
                     <xsl:if test="normalize-space(./@phonetype)!=''">
166
                       <xsl:text> (</xsl:text><xsl:value-of select="./@phonetype"/><xsl:text>)</xsl:text>
167
                     </xsl:if>
168
                   </td>
169
               </tr>
170
             </table>
171
          </td>
172
      </tr>
173
  </xsl:template>
174

  
175

  
176
  <xsl:template match="electronicMailAddress" mode="party">
177
      <xsl:param name="partyfirstColStyle"/>
178
      <xsl:if test="normalize-space(.)!=''">
179
       <tr><td class="{$partyfirstColStyle}" >
180
            Email Address:
181
          </td>
182
          <td>
183
            <table class="{$tablepartyStyle}">
184
              <tr><td class="{$secondColStyle}">
185
                    <a><xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute><xsl:value-of select="./entityName"/>
186
                    <xsl:value-of select="."/></a>
187
                   </td>
188
              </tr>
189
            </table>
190
          </td>
191
        </tr>
192
      </xsl:if>
193
  </xsl:template>
194

  
195

  
196
  <xsl:template match="onlineUrl" mode="party">
197
      <xsl:param name="partyfirstColStyle"/>
198
      <xsl:if test="normalize-space(.)!=''">
199
      <tr><td class="{$partyfirstColStyle}" >
200
            Web Address:
201
          </td>
202
          <td>
203
             <table class="{$tablepartyStyle}">
204
               <tr><td class="{$secondColStyle}">
205
                     <a><xsl:attribute name="href">http://<xsl:value-of select="."/></xsl:attribute><xsl:value-of select="./entityName"/>
206
                     <xsl:value-of select="."/></a>
207
                    </td>
208
               </tr>
209
             </table>
210
           </td>
211
        </tr>
212
      </xsl:if>
213
  </xsl:template>
214

  
215

  
216
  <xsl:template match="userId" mode="party">
217
      <xsl:param name="partyfirstColStyle"/>
218
      <xsl:if test="normalize-space(.)!=''">
219
      <tr><td class="{$partyfirstColStyle}" >
220
        Id:</td><td class="{$secondColStyle}">
221
        <xsl:value-of select="."/></td></tr>
222
      </xsl:if>
223
  </xsl:template>
224
  <xsl:template match="text()" mode="party" />
225
</xsl:stylesheet>
0 226

  
lib/style/shared/eml-2.0.0/eml-settings.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
  *****************************************************************************
28
  *
29
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet that provides a
30
  * single, central location for setting all installation-specific paths for
31
  * XSLT stylesheets.  It is intended to be imported (using the
32
  * <xsl:import href="..." /> element) into other XSLT stylesheets used in the
33
  * transformation of xml files that are valid with respect to the
34
  * applicable dtd of the Ecological Metadata Language (EML).
35

  
36
  * Some of these paths incorporate values of the form: @token-name@; these are
37
  * intended to allow an Ant (http://jakarta.apache.org/ant/index.html) build
38
  * script to replace the tokens automatically with the correct values at build/
39
  * install time.  If Ant is not used, the tokens may simply be edited by hand
40
  * to point to the correct resources.
41
  * Note that the values given below may be overridden by passing parameters to
42
  * the XSLT processor programatically, although the procedure for doing so is
43
  * vendor-specific.  Note also that these parameter definitions will be overridden
44
  * by any identical parameter names declared within xsl stylesheets that import
45
  * this stylesheet.
46
  *
47
-->
48

  
49
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
50

  
51

  
52
<!--
53
    /**
54
    *   The filename of the default css stylesheet to be used
55
    *   (filename only - not the whole path, and no ".css" extension.  The
56
    *   example below would look for a file named "default.css" in the same
57
    *   directory as the stylesheets
58
    */
59
-->
60

  
61
  <xsl:param name="qformat">@default-style@</xsl:param>
62

  
63

  
64
<!--
65
    /**
66
    *   The module which need to be display in eml2 document. The default
67
    *   value is dataset
68
    */
69
-->
70
  <xsl:param name="displaymodule">dataset</xsl:param>
71

  
72

  
73
<!--
74
    /**
75
    *   To show the links for the Entities in the dataset display module.
76
    */
77
-->
78
  <xsl:param name="withEntityLinks">1</xsl:param>
79

  
80

  
81
<!--
82
    /**
83
    *   To show the link for Additional Metadata in the dataset display module.
84
    */
85
-->
86
  <xsl:param name="withAdditionalMetadataLink">1</xsl:param>
87

  
88

  
89
<!--
90
    /**
91
    *   To show the link for the Original XML in the dataset display module.
92
    */
93
-->
94
  <xsl:param name="withOriginalXMLLink">1</xsl:param>
95

  
96

  
97
<!--
98
    /**
99
    *   To show the Attributes table in the entity display.
100
    */
101
-->
102
  <xsl:param name="withAttributes">1</xsl:param>
103

  
104

  
105
<!--
106
   /**
107
    *   the path of the directory where the XSL and CSS files reside - starts
108
    *   with context name, eg: /myContextRoot/styleDirectory.
109
    *   (As found in "http://hostname:port/myContextRoot/styleDirectory").
110
    *   Needs leading slash but not trailing slash
111
    *
112
    *   EXAMPLE:
113
    *       <xsl:param name="stylePath">/brooke/style</xsl:param>
114
    */
115
-->
116

  
117
    <xsl:param name="stylePath">@style-skins-path@</xsl:param>
118

  
119

  
120
<!--
121
   /*
122
    *   the path of the directory where the common javascript and css files
123
    *   reside - i.e the files that are not skin-specific. Starts
124
    *   with context name, eg: /myContextRoot/styleCommonDirectory.
125
    *   (As found in "http://hostname:port/myContextRoot/styleCommonDirectory").
126
    *
127
    *   EXAMPLE
128
    *       <xsl:param name="styleCommonPath">/brooke/style/common</xsl:param>
129
    */
130
-->
131

  
132
    <xsl:param name="styleCommonPath">@style-common-path@</xsl:param>
133

  
134

  
135
<!--the docid of xml which is processed-->
136
    <xsl:param name="docid"/>
137
<!-- type of entity, data table or spacial raster or others-->
138
    <xsl:param name="entitytype"></xsl:param>
139
<!-- the index of entity in same entity type -->
140
    <xsl:param name="entityindex"/>
141
<!-- the index of attribute in same entity -->
142
    <xsl:param name="attributeindex"/>
143
<!-- the index of physical part in entity part-->
144
    <xsl:param name="physicalindex"/>
145
<!-- the index of distribution in physical part  -->
146
    <xsl:param name="distributionindex"/>
147
<!-- the levle of distribution -->
148
    <xsl:param name="distributionlevel"/>
149
<!-- the index of attribute in attribute list-->
150
    <xsl:param name="attributeindex"/>
151
<!-- the index of additional metadata-->
152
    <xsl:param name="additionalmetadataindex"/>
153
<!-- attribute set to get rid of cell spacing-->
154
    <xsl:attribute-set name="cellspacing">
155
      <xsl:attribute name="cellpadding">0</xsl:attribute>
156
      <xsl:attribute name="cellspacing">0</xsl:attribute>
157
    </xsl:attribute-set>
158

  
159

  
160
<!--
161
    /**
162
    *   The base URI to be used for the href link to each document in a
163
    *   "subject-relationaship-object" triple
164
    *
165
    *   EXAMPLE:
166
    *       <xsl:param name="tripleURI">
167
    *         <![CDATA[/brooke/catalog/metacat?action=read&qformat=knb&docid=]]>
168
    *       </xsl:param>
169
    *
170
    *   (Note in the above case the "qformat=knb" parameter in the url; a system
171
    *   could pass this parameter to the XSLT engine to override the local
172
    *   <xsl:param name="qformat"> tags defined earlier in this document.)
173
    */
174
-->
175

  
176
    <xsl:param name="tripleURI"><![CDATA[@html-path@/metacat?action=read&qformat=]]><xsl:value-of select="$qformat" /><![CDATA[&docid=]]></xsl:param>
177

  
178
    <!-- URL for xmlformat-->
179
    <xsl:param name="xmlURI"><![CDATA[@html-path@/metacat?action=read&qformat=xml&docid=]]></xsl:param>
180

  
181

  
182
<!--
183
    /**
184
    *   Most of the html pages are currently laid out as a 2-column table, with
185
    *   highlights for more-major rows containing subsection titles etc.
186
    *   The following parameters are used within the
187
    *           <td width="whateverWidth" class="whateverClass">
188
    *   tags to define the column widths and (css) styles.
189
    *
190
    *   The values of the "xxxColWidth" parameters can be percentages (need to
191
    *   include % sign) or pixels (number only). Note that if a width is defined
192
    *   in the CSS stylesheet (see next paragraph), it will override this local
193
    *   width setting in browsers newer than NN4
194
    *
195
    *   The values of the "xxxColStyle" parameters refer to style definitions
196
    *   listed in the *.css stylesheet that is defined in this xsl document,
197
    *   above (in the <xsl:param name="qformat"> tag).
198
    *
199
    *   (Note that if the "qformat" is changed from the default by passing a
200
    *   value in the url (see notes for <xsl:param name="qformat"> tag, above),
201
    *   then the params below must match style names in the "new" CSS stylesheet
202
    */
203
-->
204

  
205
<!--    the style for major rows containing subsection titles etc. -->
206
  <xsl:param name="subHeaderStyle" select="'tablehead'"/>
207

  
208
<!--    the style for major rows containing links, such as additional metadata, 
209
        original xml file etc. -->
210
  <xsl:param name="linkedHeaderStyle" select="'linkedHeaderStyle'"/>
211

  
212
<!--    the width for the first column (but see note above) -->
213
  <xsl:param name="firstColWidth" select="'15%'"/>
214

  
215
<!-- the style for the first column -->
216
  <xsl:param name="firstColStyle" select="'rowodd'"/>
217

  
218
<!--    the width for the second column (but see note above) -->
219
  <xsl:param name="secondColWidth" select="'85%'"/>
220

  
221
<!-- the style for the second column -->
222
  <xsl:param name="secondColStyle" select="'roweven'"/>
223

  
224
<!-- the style for the attribute table -->
225
  <xsl:param name="tableattributeStyle" select="'tableattribute'"/>
226

  
227
<!-- the style for the border -->
228
  <xsl:param name="borderStyle" select="'bordered'"/>
229

  
230
<!-- the style for the even col in attributes table -->
231
  <xsl:param name="colevenStyle" select="'coleven'"/>
232

  
233
<!-- the style for the inner even col in attributes table -->
234
  <xsl:param name="innercolevenStyle" select="'innercoleven'"/>
235

  
236
<!-- the style for the odd col in attributes table -->
237
  <xsl:param name="coloddStyle" select="'colodd'"/>
238

  
239
<!-- the style for the inner odd col in attributes table -->
240
  <xsl:param name="innercoloddStyle" select="'innercolodd'"/>
241

  
242

  
243
<!-- the default alignment style for the wrapper around the main tables -->
244
  <!--
245
  <xsl:param name="mainTableAligmentStyle" select="'mainTableAligmentStyle'"/>
246
  -->
247
  <xsl:param name="mainTableAligmentStyle" select="'content'"/>
248

  
249
<!-- the default style for the main container table -->
250
  <xsl:param name="mainContainerTableStyle" select="'group group_border'"/>
251

  
252
<!-- the default style for all other tables -->
253
  <xsl:param name="tabledefaultStyle" select="'subGroup subGroup_border onehundred_percent'"/>
254

  
255
<!-- the style for table party -->
256
  <xsl:param name="tablepartyStyle" select="'tableparty'"/>
257

  
258
<!-- Some html pages use a nested table in the second column.
259
     Some of these nested tables set their first column to
260
     the following width: -->
261
  <xsl:param name="secondColIndent" select="'10%'"/>
262

  
263
<!-- the first column width of attribute table-->
264
  <xsl:param name="attributefirstColWidth" select="'15%'"/>
265

  
266
</xsl:stylesheet>
0 267

  
lib/style/shared/eml-2.0.0/eml-protocol.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:output method="html" encoding="iso-8859-1"
35
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
36
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
37
              indent="yes" />  
38

  
39

  
40

  
41
  <xsl:template name="protocol">
42
    <xsl:param name="protocolfirstColStyle"/>
43
    <xsl:param name="protocolsubHeaderStyle"/>
44
    <table class="{$tabledefaultStyle}">
45
        <xsl:choose>
46
         <xsl:when test="references!=''">
47
          <xsl:variable name="ref_id" select="references"/>
48
          <xsl:variable name="references" select="$ids[@id=$ref_id]" />
49
          <xsl:for-each select="$references">
50
            <xsl:call-template name="protocolcommon">
51
              <xsl:with-param name="protocolfirstColStyle" select="$protocolfirstColStyle"/>
52
              <xsl:with-param name="protocolsubHeaderStyle" select="$protocolsubHeaderStyle"/>
53
            </xsl:call-template>
54
          </xsl:for-each>
55
        </xsl:when>
56
        <xsl:otherwise>
57
           <xsl:call-template name="protocolcommon">
58
              <xsl:with-param name="protocolfirstColStyle" select="$protocolfirstColStyle"/>
59
              <xsl:with-param name="protocolsubHeaderStyle" select="$protocolsubHeaderStyle"/>
60
           </xsl:call-template>
61
        </xsl:otherwise>
62
      </xsl:choose>
63
    </table>
64
  </xsl:template>
65

  
66
   <xsl:template name="protocolcommon">
67
        <xsl:param name="protocolfirstColStyle"/>
68
        <xsl:param name="protocolsubHeaderStyle"/>
69
        <xsl:call-template name="resource">
70
           <xsl:with-param name="resfirstColStyle" select="$protocolfirstColStyle"/>
71
           <xsl:with-param name="ressubHeaderStyle" select="$protocolsubHeaderStyle"/>
72
           <xsl:with-param name="creator">Author(s):</xsl:with-param>
73
        </xsl:call-template>
74
        <xsl:for-each select="proceduralStep">
75
          <tr><td colspan="2" class="{$protocolsubHeaderStyle}">
76
              Step<xsl:text> </xsl:text><xsl:value-of select="position()"/>:
77
              </td>
78
          </tr>
79
          <xsl:call-template name="step">
80
              <xsl:with-param name="protocolfirstColStyle" select="$protocolfirstColStyle"/>
81
              <xsl:with-param name="protocolsubHeaderStyle" select="$protocolsubHeaderStyle"/>
82
          </xsl:call-template>
83
        </xsl:for-each>
84
        <xsl:call-template name="protocolAccess">
85
              <xsl:with-param name="protocolfirstColStyle" select="$protocolfirstColStyle"/>
86
              <xsl:with-param name="protocolsubHeaderStyle" select="$protocolsubHeaderStyle"/>
87
        </xsl:call-template>
88
  </xsl:template>
89

  
90
  <xsl:template name="step">
91
    <xsl:param name="protocolfirstColStyle"/>
92
    <xsl:param name="protocolsubHeaderStyle"/>
93
    <xsl:for-each select="description">
94
      <tr><td class="{$protocolfirstColStyle}">
95
          Description:
96
          </td>
97
          <td>
98
             <xsl:call-template name="text">
99
               <xsl:with-param name="textfirstColStyle" select="$protocolfirstColStyle"/>
100
             </xsl:call-template>
101
          </td>
102
      </tr>
103
     </xsl:for-each>
104
    <xsl:for-each select="citation">
105
      <tr><td class="{$protocolfirstColStyle}">
106
          Citation:
107
          </td>
108
          <td class="{$secondColStyle}">
109
           &#160;
110
          </td>
111
      </tr>
112
      <tr><td colspan="2">
113
          <xsl:call-template name="citation">
114
            <xsl:with-param name="citationfirstColStyle" select="$protocolfirstColStyle"/>
115
            <xsl:with-param name="citationsubHeaderStyle" select="$protocolsubHeaderStyle"/>
116
          </xsl:call-template>
117
          </td>
118
      </tr>
119
    </xsl:for-each>
120
     <xsl:for-each select="protocol">
121
      <tr><td class="{$protocolfirstColStyle}">
122
          Protocol:
123
          </td>
124
          <td class="{$secondColStyle}">
125
           &#160;
126
          </td>
127
      </tr>
128
      <tr><td colspan="2">
129
          <xsl:call-template name="protocol">
130
            <xsl:with-param name="protocolfirstColStyle" select="$protocolfirstColStyle"/>
131
            <xsl:with-param name="protocolsubHeaderStyle" select="$protocolsubHeaderStyle"/>
132
          </xsl:call-template>
133
          </td>
134
      </tr>
135
    </xsl:for-each>
136
    <xsl:for-each select="instrumentation">
137
        <tr><td class="{$protocolfirstColStyle}">
138
          Instrument(s):
139
          </td>
140
          <td class="{$secondColStyle}">
141
            <xsl:value-of select="."/>
142
          </td>
143
      </tr>
144
    </xsl:for-each>
145
    <xsl:for-each select="software">
146
     <tr><td colspan="2">
147
          <xsl:call-template name="software">
148
            <xsl:with-param name="softwarefirstColStyle" select="$protocolfirstColStyle"/>
149
            <xsl:with-param name="softwaresubHeaderStyle" select="$protocolsubHeaderStyle"/>
150
          </xsl:call-template>
151
          </td>
152
      </tr>
153
    </xsl:for-each>
154
    <xsl:for-each select="subStep">
155
      <tr><td class="{$protocolfirstColStyle}">
156
          Substep<xsl:text> </xsl:text><xsl:value-of select="position()"/>
157
          </td>
158
          <td class="{$secondColStyle}">
159
           &#160;
160
          </td>
161
      </tr>
162
      <xsl:call-template name="step">
163
          <xsl:with-param name="protocolfirstColStyle" select="$protocolfirstColStyle"/>
164
          <xsl:with-param name="protocolsubHeaderStyle" select="$protocolsubHeaderStyle"/>
165
      </xsl:call-template>
166
    </xsl:for-each>
167
  </xsl:template>
168

  
169
  <xsl:template name="protocolAccess">
170
    <xsl:param name="protocolfirstColStyle"/>
171
    <xsl:param name="protocolsubHeaderStyle"/>
172
    <xsl:for-each select="access">
173
      <tr><td colspan="2">
174
         <xsl:call-template name="access">
175
           <xsl:with-param name="accessfirstColStyle" select="$protocolfirstColStyle"/>
176
           <xsl:with-param name="accesssubHeaderStyle" select="$protocolsubHeaderStyle"/>
177
         </xsl:call-template>
178
         </td>
179
       </tr>
180
    </xsl:for-each>
181
  </xsl:template>
182
</xsl:stylesheet>
0 183

  
lib/style/shared/eml-2.0.0/eml-access.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Matt Jones
5
  *    Copyright: 2000 Regents of the University of California and the
6
  *               National Center for Ecological Analysis and Synthesis
7
  *  For Details: http://www.nceas.ucsb.edu/
8
  *
9
  *   '$Author$'
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-dataset.dtd
29
  * module of the Ecological Metadata Language (EML) into an HTML format
30
  * suitable for rendering with modern web browsers.
31
-->
32
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
33

  
34

  
35
  <xsl:output method="html" encoding="iso-8859-1"
36
    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
37
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
38
    indent="yes" />  
39
  <xsl:template name="access">
40
    <xsl:param name="accessfirstColStyle"/>
41
    <xsl:param name="accesssubHeaderStyle"/>
42
    <table class="{$tabledefaultStyle}">
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:call-template name="accessCommon">
49
             <xsl:with-param name="accessfirstColStyle" select="$accessfirstColStyle"/>
50
             <xsl:with-param name="accesssubHeaderStyle" select="$accesssubHeaderStyle"/>
51
            </xsl:call-template>
52
          </xsl:for-each>
53
        </xsl:when>
54
        <xsl:otherwise>
55
          <xsl:call-template name="accessCommon">
56
             <xsl:with-param name="accessfirstColStyle" select="$accessfirstColStyle"/>
57
             <xsl:with-param name="accesssubHeaderStyle" select="$accesssubHeaderStyle"/>
58
          </xsl:call-template>
59
        </xsl:otherwise>
60
      </xsl:choose>
61
    </table>
62

  
63
  </xsl:template>
64
  <xsl:template name="accessCommon">
65
     <xsl:param name="accessfirstColStyle" />
66
     <xsl:param name="accesssubHeaderStyle"/>
67
        <xsl:call-template name="accesssystem">
68
           <xsl:with-param name="accessfirstColStyle" select="$accessfirstColStyle"/>
69
           <xsl:with-param name="accesssubHeaderStyle" select="$accesssubHeaderStyle"/>
70
        </xsl:call-template>
71
        <xsl:if test="normalize-space(./@order)='allowFirst' and (allow)">
72
            <xsl:call-template name="allow_deny">
73
                <xsl:with-param name="permission" select="'allow'"/>
74
                <xsl:with-param name="accessfirstColStyle" select="$accessfirstColStyle"/>
75
             </xsl:call-template>
76
        </xsl:if>
77
        <xsl:if test="(deny)">
78
           <xsl:call-template name="allow_deny">
79
                <xsl:with-param name="permission" select="'deny'"/>
80
                <xsl:with-param name="accessfirstColStyle" select="$accessfirstColStyle"/>
81
            </xsl:call-template>
82
        </xsl:if>
83
        <xsl:if test="normalize-space(acl/@order)='denyFirst' and (allow)">
84
            <xsl:call-template name="allow_deny">
85
                <xsl:with-param name="permission" select="'allow'"/>
86
                <xsl:with-param name="accessfirstColStyle" select="$accessfirstColStyle"/>
87
            </xsl:call-template>
88
        </xsl:if>
89

  
90

  
91
  </xsl:template>
92

  
93

  
94
  <xsl:template name="allow_deny">
95
   <xsl:param name="permission"/>
96
   <xsl:param name="accessfirstColStyle" />
97
   <xsl:choose>
98
       <xsl:when test="$permission='allow'">
99
          <xsl:for-each select="allow">
100
            <tr>
101
              <td class="{$accessfirstColStyle}">
102
               Allow:
103
              </td>
104
              <td class="{$accessfirstColStyle}">
105
                <xsl:for-each select="./permission">
106
                  <xsl:text>[</xsl:text><xsl:value-of select="."/><xsl:text>] </xsl:text>
107
                </xsl:for-each>
108
              </td>
109
              <td class="{$accessfirstColStyle}" >
110
                <xsl:for-each select="principal">
111
                  <xsl:value-of select="."/><br/>
112
                </xsl:for-each>
113
              </td>
114
            </tr>
115
          </xsl:for-each>
116
       </xsl:when>
117
       <xsl:otherwise>
118
         <xsl:for-each select="deny">
119
            <tr>
120
              <td class="{$accessfirstColStyle}">
121
               Deny:
122
              </td>
123
              <td class="{$accessfirstColStyle}">
124
                <xsl:for-each select="./permission">
125
                  <xsl:text>[</xsl:text><xsl:value-of select="."/><xsl:text>] </xsl:text>
126
                </xsl:for-each>
127
              </td>
128
              <td class="{$accessfirstColStyle}" >
129
                <xsl:for-each select="principal">
130
                  <xsl:value-of select="."/><br/>
131
                </xsl:for-each>
132
              </td>
133
            </tr>
134
         </xsl:for-each>
135
       </xsl:otherwise>
136
   </xsl:choose>
137

  
138
   </xsl:template>
139

  
140
  <xsl:template name="accesssystem">
141
       <xsl:param name="accessfirstColStyle" />
142
        <tr>
143
          <th colspan="3">
144
            <xsl:text>Access Control:</xsl:text>
145
          </th>
146
        </tr>
147
        <tr>
148
          <td class="{$accessfirstColStyle}">Auth System:</td>
149
          <td class="{$secondColStyle}"><xsl:value-of select="./@authSystem"/></td>
150
        </tr>
151
        <tr>
152
          <td class="{$accessfirstColStyle}">Order:</td>
153
          <td class="{$secondColStyle}"><xsl:value-of select="./@order"/></td>
154
        </tr>
155
  </xsl:template>
156

  
157
</xsl:stylesheet>
0 158

  
lib/style/shared/eml-2.0.0/eml.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Matt Jones
5
  *    Copyright: 2000 Regents of the University of California and the
6
  *         National Center for Ecological Analysis and Synthesis
7
  *  For Details: http://www.nceas.ucsb.edu/
8
  *
9
  *   '$Author$'
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-dataset.dtd
29
  * module of the Ecological Metadata Language (EML) into an HTML format
30
  * suitable for rendering with modern web browsers.
31
-->
32
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
33
  <xsl:import href="eml-access.xsl"/>
34
  <xsl:import href="eml-additionalmetadata.xsl"/>
35
  <xsl:import href="eml-attribute.xsl"/>
36
  <xsl:import href="eml-attribute-enumeratedDomain.xsl"/>
37
  <xsl:import href="eml-constraint.xsl"/>
38
  <xsl:import href="eml-coverage.xsl"/>
39
  <xsl:import href="eml-dataset.xsl"/>
40
  <xsl:import href="eml-datatable.xsl"/>
41
  <xsl:import href="eml-distribution.xsl"/>
42
  <xsl:import href="eml-entity.xsl"/>
43
  <xsl:import href="eml-identifier.xsl"/>
44
  <xsl:import href="eml-literature.xsl"/>
45
  <xsl:import href="eml-method.xsl"/>
46
  <xsl:import href="eml-otherentity.xsl"/>
47
  <xsl:import href="eml-party.xsl"/>
48
  <xsl:import href="eml-physical.xsl"/>
49
  <xsl:import href="eml-project.xsl"/>
50
  <xsl:import href="eml-protocol.xsl"/>
51
  <xsl:import href="eml-resource.xsl"/>
52
  <xsl:import href="eml-settings.xsl"/>
53
  <xsl:import href="eml-software.xsl"/>
54
  <xsl:import href="eml-spatialraster.xsl"/>
55
  <xsl:import href="eml-spatialvector.xsl"/>
56
  <xsl:import href="eml-storedprocedure.xsl"/>
57
  <xsl:import href="eml-text.xsl"/>
58
  <xsl:import href="eml-view.xsl"/>
59
  <xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/pageheader.xsl"/>
60
  <xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/pagefooter.xsl"/>
61
  <xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/page_leftsidebar.xsl"/>
62
  <xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/page_rightsidebar.xsl"/>
63
  <xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/page_rightsidebar.xsl"/>
64

  
65
  <xsl:output method="html" encoding="iso-8859-1"
66
    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
67
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
68
    indent="yes" />  
69
  <!-- global variables to store id node set in case to be referenced-->
70
  <xsl:variable name="ids" select="//*[@id!='']"/>
71

  
72
  <xsl:template match="/">
73
    <html>
74
      <head>
75
        <link rel="stylesheet" type="text/css"
76
              href="{$stylePath}/{$qformat}/{$qformat}.css" />
77
      </head>
78
      <body>
79
        <!-- begin the header area -->
80
        <xsl:call-template name="pageheader" />
81
        <!-- end the header area -->
82
   
83
        <!-- begin the left sidebar area -->
84
        <xsl:call-template name="page_leftsidebar" />
85
        <!-- end the left sidebar area -->
86
   
87
        <!-- begin the content area -->
88
        <div id="{$mainTableAligmentStyle}">
89
          <xsl:apply-templates select="*[local-name()='eml']"/>
90
        </div>
91
        <!-- end the content area -->
92
   
93
        <!-- begin the right sidebar area -->
94
        <xsl:call-template name="page_rightsidebar" />
95
        <!-- end the right sidebar area -->
96

  
97
        <!-- begin the footer area -->
98
        <xsl:call-template name="pagefooter" />
99
        <!-- end the footer area -->
100
      </body>
101
    </html>
102
   </xsl:template>
103

  
104
   <xsl:template match="*[local-name()='eml']">
105
     <xsl:for-each select="dataset">
106
       <xsl:call-template name="emldataset"/>
107
     </xsl:for-each>
108
     <xsl:for-each select="citation">
109
       <xsl:call-template name="emlcitation"/>
110
     </xsl:for-each>
111
     <xsl:for-each select="software">
112
       <xsl:call-template name="emlsoftware"/>
113
     </xsl:for-each>
114
     <xsl:for-each select="protocol">
115
       <xsl:call-template name="emlprotocol"/>
116
     </xsl:for-each>
117
     <!-- Additional metadata-->
118
     <xsl:choose>
119
       <xsl:when test="$displaymodule='additionalmetadata'">
120
         <xsl:for-each select="additionalMetadata">
121
           <xsl:if test="$additionalmetadataindex=position()">
122
              <div class="{$tabledefaultStyle}">
123
                 <xsl:call-template name="additionalmetadata"/>
124
               </div>
125
            </xsl:if>
126
         </xsl:for-each>
127
       </xsl:when>
128
       <xsl:otherwise>
129
         <xsl:if test="$displaymodule='dataset'">
130
           <xsl:if test="$withAdditionalMetadataLink='1'">
131
             <xsl:for-each select="additionalMetadata">
132
               <div class="{$tabledefaultStyle}">
133
                 <xsl:call-template name="additionalmetadataURL">
134
                    <xsl:with-param name="index" select="position()"/>
135
                  </xsl:call-template>
136
               </div>
137
             </xsl:for-each>
138
           </xsl:if>
139
         </xsl:if>
140
       </xsl:otherwise>
141
     </xsl:choose>
142
     <!-- xml format-->
143
     <xsl:if test="$displaymodule='dataset'">
144
       <xsl:if test="$withOriginalXMLLink='1'">
145
         <xsl:call-template name="xml"/>
146
       </xsl:if>
147
     </xsl:if>
148
   </xsl:template>
149

  
150
   <!--********************************************************
151
                       dataset part
152
       ********************************************************-->
153

  
154
   <xsl:template name="emldataset">
155
    <div class="{$mainContainerTableStyle}">
156
    <xsl:if test="$displaymodule='dataset'">
157
       <xsl:call-template name="datasetpart"/>
158
    </xsl:if>
159
    <xsl:if test="$displaymodule='entity'">
160
       <xsl:call-template name="entitypart"/>
161
    </xsl:if>
162
    <xsl:if test="$displaymodule='attribute'">
163
       <xsl:call-template name="attributepart"/>
164
    </xsl:if>
165
    <xsl:if test="$displaymodule='attributedomain'">
166
       <xsl:call-template name="datasetattributedomain"/>
167
    </xsl:if>
168
    <xsl:if test="$displaymodule='attributecoverage'">
169
       <xsl:call-template name="datasetattributecoverage"/>
170
    </xsl:if>
171
    <xsl:if test="$displaymodule='attributemethod'">
172
       <xsl:call-template name="datasetattributemethod"/>
173
    </xsl:if>
174
    <xsl:if test="$displaymodule='inlinedata'">
175
       <xsl:call-template name="emlinlinedata"/>
176
    </xsl:if>
177
    <xsl:if test="$displaymodule='attributedetail'">
178
       <xsl:call-template name="entityparam"/>
179
    </xsl:if>
180
    </div>
181
   </xsl:template>
182

  
183
   <!--*************** Data set diaplay *************-->
184
   <xsl:template name="datasetpart">
185
       <xsl:apply-templates select="." mode="dataset"/>
186
   </xsl:template>
187

  
188
   <!--************ Entity diplay *****************-->
189
   <xsl:template name="entitypart">
190
       <xsl:choose>
191
         <xsl:when test="references!=''">
192
            <xsl:variable name="ref_id" select="references"/>
193
            <xsl:variable name="references" select="$ids[@id=$ref_id]" />
194
            <xsl:for-each select="$references">
195
               <xsl:call-template name="entitypartcommon"/>
196
            </xsl:for-each>
197
         </xsl:when>
198
         <xsl:otherwise>
199
            <xsl:call-template name="entitypartcommon"/>
200
        </xsl:otherwise>
201
   </xsl:choose>
202
    </xsl:template>
203

  
204

  
205
    <xsl:template name="entitypartcommon">
206
      <tr><th colspan="2">
207
      Entity Description
208
      </th></tr>
209
      <xsl:call-template name="identifier">
210
          <xsl:with-param name="packageID" select="../@packageId"/>
211
          <xsl:with-param name="system" select="../@system"/>
212
      </xsl:call-template>
213
      <tr>
214
     <td colspan="2">
215
        <!-- find the subtree to process -->
216
       <xsl:call-template name="entityparam"/>
217
     </td>
218
      </tr>
219
   </xsl:template>
220

  
221
   <!--************ Attribute display *****************-->
222
   <xsl:template name="attributedetailpart">
223
   </xsl:template>
224

  
225
    <xsl:template name="attributepart">
226
      <tr><td>
227
      <h3>Attributes Description</h3>
228
      </td></tr>
229
      <tr>
230
     <td>
231
        <!-- find the subtree to process -->
232
      <xsl:if test="$entitytype='dataTable'">
233
        <xsl:for-each select="dataTable">
234
            <xsl:if test="position()=$entityindex">
235
                <xsl:for-each select="attributeList">
236
                   <xsl:call-template name="attributelist">
237
                      <xsl:with-param name="docid" select="$docid"/>
238
                      <xsl:with-param name="entitytype" select="$entitytype"/>
239
                      <xsl:with-param name="entityindex" select="$entityindex"/>
240
                   </xsl:call-template>
241
                </xsl:for-each>
242
            </xsl:if>
243
        </xsl:for-each>
244
      </xsl:if>
245
    </td>
246
      </tr>
247
   </xsl:template>
248

  
249
   <!--************************Attribute Domain display module************************-->
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff