Project

General

Profile

1 432 berkley
<?xml version="1.0"?>
2
<!--
3
  * marine.xsl
4
  *
5
  *      Authors: Chad Berkley
6
  *    Copyright: 2000 Regents of the University of California and the
7
  *               National Center for Ecological Analysis and Synthesis
8
  *  For Details: http://www.nceas.ucsb.edu/
9
  *      Created: 2000 July 20
10
  *    File Info: '$Id$'
11
  *
12
-->
13
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
14
  <xsl:output method="html" />
15
  <xsl:template match="/">
16
    <html>
17
    <head>
18 470 berkley
      <link rel="stylesheet" type="text/css"
19 497 jones
       href="@html-path@/style/rowcol.css" />
20 432 berkley
      <title>
21
        <xsl:value-of select="//title" />
22
      </title>
23
    </head>
24
    <body bgcolor="white">
25
      <h1><xsl:value-of select="//title" /></h1>
26 470 berkley
      <xsl:if test="count(//alternateTitle) &gt; 0">
27
        <h2><xsl:value-of select="//alternateTitle" /></h2>
28
      </xsl:if>
29
30 432 berkley
      <!-- display the literature specific fields if they are present -->
31
      <xsl:if test="count(resource/literature/ISBN) &gt; 0">
32
        <h2>ISBN: <xsl:value-of select="resource/literature/ISBN" /></h2>
33
      </xsl:if>
34
      <xsl:if test="count(resource/literature/editor) &gt; 0">
35
        <xsl:for-each select="resource/literature/editor">
36
          <h2>editor: <xsl:value-of select="resource/literature/editor" /></h2>
37
        </xsl:for-each>
38
      </xsl:if>
39
      <xsl:if test="count(resource/literature/edition) &gt; 0">
40
        <h2>edition: <xsl:value-of select="resource/literature/edition" /></h2>
41
      </xsl:if>
42
      <xsl:if test="count(resource/literature/volume) &gt; 0">
43
        <h2>volume: <xsl:value-of select="resource/literature/volume" /></h2>
44
      </xsl:if>
45
      <xsl:if test="count(resource/literature/ISBN) &gt; 0">
46
        <h2>ISBN: <xsl:value-of select="resource/literature/ISBN" /></h2>
47
      </xsl:if>
48
49
      <!-- display the dataset specific field if present -->
50
      <xsl:if test="count(resource/dataset/geoForm) &gt; 0">
51 497 jones
        <h3 class="highlight">Data Form:</h3>
52
        <xsl:value-of select="resource/dataset/geoForm" />
53 432 berkley
      </xsl:if>
54
55
      <!-- display the contact information -->
56 497 jones
      <h3 class="highlight">Contacts</h3>
57 432 berkley
58
      <xsl:for-each select="resource/*/originator">
59 497 jones
        <u>
60 432 berkley
        <xsl:value-of select="./individualName/salutation" />&nbsp;
61
        <xsl:value-of select="./individualName/givenName" />&nbsp;
62
        <xsl:value-of select="./individualName/surName" />&nbsp;
63 497 jones
        </u>
64 432 berkley
        <br />
65 497 jones
        <dir>
66
        <xsl:text>Role: </xsl:text>
67
        <xsl:value-of select="./roleCode" /><br/>
68 432 berkley
        <xsl:if test="count(resource/*/organizationName) &gt; 0">
69
          <xsl:value-of select="./organizationName" />
70
          <br />
71
        </xsl:if>
72
73
        <xsl:if test="count(./contactInfo/phone/voice) &gt; 0">
74 497 jones
          Phone:&nbsp;
75 432 berkley
          <xsl:for-each select="./contactInfo/phone/voice">
76
           <xsl:value-of select="." />
77
            <br />
78
          </xsl:for-each>
79
        </xsl:if>
80
81
        <xsl:if test="count(./contactInfo/phone/facsimile) &gt; 0">
82 497 jones
          Fax:&nbsp;
83 432 berkley
          <xsl:for-each select="./contactInfo/phone/facsimile">
84
            <xsl:value-of select="." />
85
            <br />
86
          </xsl:for-each>
87
        </xsl:if>
88
89
        <xsl:if test="count(./contactInfo/phone/other) &gt; 0">
90 497 jones
          Other phone:&nbsp;
91 432 berkley
          <xsl:for-each select="./contactInfo/phone/other">
92
            <xsl:value-of select="." />
93
            &nbsp;&nbsp;
94 497 jones
            <xsl:text>Number type:</xsl:text>
95 432 berkley
            <xsl:value-of select="/resource/*/*/contactInfo/phone/otherType" />
96
            <br />
97
          </xsl:for-each>
98
        </xsl:if>
99
100
        <xsl:if test="count(./contactInfo/address) &gt; 0">
101
          <xsl:value-of select="./contactInfo/address/deliveryPoint" /><br/>
102
          <xsl:value-of select="./contactInfo/address/city" />,&nbsp;
103
          <xsl:value-of select="./contactInfo/address/administrativeArea" />&nbsp;
104
          <xsl:value-of select="./contactInfo/address/postalCode" />&nbsp;<br/>
105
          <xsl:value-of select="./contactInfo/address/country" /><br/>
106
          <xsl:value-of select="./contactInfo/address/electronicMailAddress" />
107
          <br/>
108
        </xsl:if>
109
110
        <xsl:if test="count(./onlineResource) &gt; 0">
111
          <xsl:value-of select="./onlineResource/linkage/URL" /><br/>
112
          <xsl:value-of select="./onlineResource/protocol" /><br/>
113
          <xsl:value-of select="./onlineResource/applicationProtocol" /><br/>
114
          <xsl:value-of select="./onlineResource/linkage/name" /><br/>
115
          <xsl:value-of select="./onlineResource/linkage/description" /><br/>
116
          <xsl:value-of select="./onlineResource/linkage/functionCode" /><br/>
117
          <br />
118
        </xsl:if>
119
120
        <xsl:if test="count(./contactInfo/hoursOfService) &gt; 0">
121 497 jones
          Office hourse:&nbsp;
122 432 berkley
          <xsl:value-of select="./contactInfo/hoursOfService" />
123
          <br/>
124
        </xsl:if>
125
126
        <xsl:if test="count(./contactInfo/contactInstructions) &gt; 0">
127 497 jones
          Contact instructions:&nbsp;
128 432 berkley
          <xsl:value-of select="./contactInfo/contactInstructions" />
129
          <br/>
130
        </xsl:if>
131
132 470 berkley
        <br/>
133 497 jones
        </dir>
134 432 berkley
      </xsl:for-each>
135
136 470 berkley
      <xsl:if test="count(resource/*/publisher) &gt; 0">
137 497 jones
        <h3 class="highlight">Publishing Information</h3>
138
        Publisher:
139 470 berkley
140
        <xsl:value-of select="resource/*/publisher/individualName/salutation" />
141
        &nbsp;
142
        <xsl:value-of select="resource/*/publisher/individualName/givenName" />&nbsp;
143
        <xsl:value-of select="resource/*/publisher/individualName/surName" />&nbsp;
144
        <br />
145
        <xsl:if test="count(resource/*/publisher/organizationName) &gt; 0">
146
          <xsl:value-of select="resource/*/publisher/organizationName" />
147
          <br />
148
        </xsl:if>
149
150
        <xsl:if test="count(resource/*/publisher/contactInfo/phone/voice) &gt; 0">
151 497 jones
          Phone:&nbsp;
152 470 berkley
          <xsl:for-each select="resource/*/publisher/contactInfo/phone/voice">
153
           <xsl:value-of select="." />
154
            <br />
155
          </xsl:for-each>
156
        </xsl:if>
157
158
        <xsl:if test="count(resource/*/publisher/contactInfo/phone/facsimile) &gt; 0">
159 497 jones
          Fax:&nbsp;
160 470 berkley
          <xsl:for-each select="resource/*/publisher/contactInfo/phone/facsimile">
161
            <xsl:value-of select="." />
162
            <br />
163
          </xsl:for-each>
164
        </xsl:if>
165
166
        <xsl:if test="count(resource/*/publisher/contactInfo/phone/other) &gt; 0">
167 497 jones
          Other phone:&nbsp;
168 470 berkley
          <xsl:for-each select="resource/*/publisher/contactInfo/phone/other">
169
            <xsl:value-of select="." />
170
            &nbsp;&nbsp;
171
            <xsl:text>Number type:</xsl:text>
172
            <xsl:value-of select="/resource/*/*/contactInfo/phone/otherType" />
173
            <br />
174
          </xsl:for-each>
175
        </xsl:if>
176
177
        <xsl:if test="count(resource/*/publisher/contactInfo/address) &gt; 0">
178
          <xsl:value-of
179
           select="resource/*/publisher/contactInfo/address/deliveryPoint" />
180
           <br/>
181
          <xsl:value-of
182
           select="resource/*/publisher/contactInfo/address/city" />,&nbsp;
183
          <xsl:value-of
184
           select="resource/*/publisher/contactInfo/address/administrativeArea"/>
185
           &nbsp;
186
          <xsl:value-of
187
           select="resource/*/publisher/contactInfo/address/postalCode" />
188
           &nbsp;<br/>
189
          <xsl:value-of
190
           select="resource/*/publisher/contactInfo/address/country" /><br/>
191
          <xsl:value-of
192
           select="resource/*/publisher/contactInfo/address/electronicMailAddress" />
193
          <br/>
194
        </xsl:if>
195
196
        <xsl:if test="count(resource/*/publisher/onlineResource) &gt; 0">
197
          <xsl:value-of
198
           select="resource/*/publisher/onlineResource/linkage/URL" /><br/>
199
          <xsl:value-of
200
           select="resource/*/publisher/onlineResource/protocol" /><br/>
201
          <xsl:value-of
202
           select="resource/*/publisher/onlineResource/applicationProtocol" />
203
           <br/>
204
          <xsl:value-of
205
           select="resource/*/publisher/onlineResource/linkage/name" /><br/>
206
          <xsl:value-of
207
           select="resource/*/publisher/onlineResource/linkage/description" />
208
           <br/>
209
          <xsl:value-of
210
           select="resource/*/publisher/onlineResource/linkage/functionCode" />
211
           <br/>
212
          <br />
213
        </xsl:if>
214
215
        <xsl:if
216
         test="count(resource/*/publisher/contactInfo/hoursOfService) &gt; 0">
217 497 jones
          Office hours:&nbsp;
218 470 berkley
          <xsl:value-of
219
           select="resource/*/publisher/contactInfo/hoursOfService" />
220
          <br/>
221
        </xsl:if>
222
223
        <xsl:if
224
         test="count(resource/*/publisher/contactInfo/contactInstructions) &gt; 0">
225 497 jones
          Contact instructions:&nbsp;
226 470 berkley
          <xsl:value-of
227
           select="resource/*/publisher/contactInfo/contactInstructions" />
228
          <br/>
229
        </xsl:if>
230
      </xsl:if>
231
232
      <xsl:if test="count(resource/*/pubdate) &gt; 0">
233 497 jones
        Publishing Date:
234 470 berkley
        &nbsp; <xsl:value-of select="resource/*/pubdate" /><br/>
235
      </xsl:if>
236
237
      <xsl:if test="count(resource/*/pubplace) &gt; 0">
238 497 jones
        Publishing Place:
239 470 berkley
        &nbsp; <xsl:value-of select="resource/*/pubplace" />
240
        <br/>
241
      </xsl:if>
242
243
      <xsl:if test="count(resource/*/series) &gt; 0">
244 497 jones
        Series:&nbsp; <xsl:value-of select="resource/*/series" /><br/>
245 470 berkley
      </xsl:if>
246
247
      <xsl:if test="count(resource/*/additionalInfo) &gt; 0">
248 497 jones
        <h3 class="highlight">Other Information</h3>
249
        Additional Information:
250 470 berkley
        &nbsp; <xsl:value-of select="resource/*/additionalInfo" /><br/>
251
      </xsl:if>
252
253
      <xsl:if test="count(resource/*/abstract) &gt; 0">
254 497 jones
        <h3 class="highlight">Abstract</h3>
255
        <xsl:value-of select="resource/*/abstract" /><br/>
256 470 berkley
      </xsl:if>
257
258
      <xsl:for-each select="resource/*/url">
259 497 jones
        URL:&nbsp;
260 470 berkley
        <a>
261
        <xsl:attribute name="href">
262
          <xsl:value-of select="./URL" />
263
        </xsl:attribute>
264
        <xsl:value-of select="./URL" /><br/>
265
        </a>
266
      </xsl:for-each>
267
      <br/>
268
269
      <xsl:if test="count(resource/*/keywordInfo) &gt; 0">
270 497 jones
        <h3 class="highlight">Keywords</h3>
271
        <table width="50%" border="0">
272
        <tr class="sectionhead">
273 470 berkley
          <th>Keyword</th><th>Keyword Type</th><th>Keyword Thesauri</th>
274
        </tr>
275
276
        <xsl:for-each select="resource/*/keywordInfo">
277
          <tr valign="top">
278
            <xsl:attribute name="class">
279
              <xsl:choose>
280 497 jones
                <xsl:when test="position() mod 2 = 1">rowodd</xsl:when>
281
                <xsl:when test="position() mod 2 = 0">roweven</xsl:when>
282 470 berkley
              </xsl:choose>
283
            </xsl:attribute>
284
            <td>
285 497 jones
              <xsl:value-of select="./keyword"/>
286 470 berkley
            </td>
287
            <td>
288
              <xsl:value-of select="./keywordType"/>
289
            </td>
290
            <td>
291
              <xsl:for-each select="./keywordThesaurus">
292
                <xsl:value-of select="."/><br/>
293
              </xsl:for-each>
294
            </td>
295
          </tr>
296
        </xsl:for-each>
297
298
        </table>
299
      </xsl:if>
300
301 432 berkley
    </body>
302
    </html>
303
  </xsl:template>
304
</xsl:stylesheet>