Project

General

Profile

« Previous | Next » 

Revision 470

Added by berkley about 24 years ago

added new fields

View differences:

lib/style/resource.xsl
15 15
  <xsl:template match="/"> 
16 16
    <html>
17 17
    <head>
18
      <link rel="stylesheet" type="text/css" 
19
       href="@html-path@/marine/rowcol.css" />
18 20
      <title>
19 21
        <xsl:value-of select="//title" />
20 22
      </title>
21 23
    </head>
22 24
    <body bgcolor="white">
23 25
      <h1><xsl:value-of select="//title" /></h1>
26
      <xsl:if test="count(//alternateTitle) &gt; 0">
27
        <h2><xsl:value-of select="//alternateTitle" /></h2>
28
      </xsl:if>
29
      
24 30
      <!-- display the literature specific fields if they are present -->
25 31
      <xsl:if test="count(resource/literature/ISBN) &gt; 0">
26 32
        <h2>ISBN: <xsl:value-of select="resource/literature/ISBN" /></h2>
......
46 52
      </xsl:if>
47 53
      
48 54
      <!-- display the contact information -->
49
      <u><h3>Contacts</h3></u>
55
      <h3 class="rowlight">Contacts</h3>
50 56
      
51 57
      <xsl:for-each select="resource/*/originator">
52 58
        <xsl:value-of select="./individualName/salutation" />&nbsp;
......
60 66
        </xsl:if>
61 67
        
62 68
        <xsl:if test="count(./contactInfo/phone/voice) &gt; 0">
63
          Voice Number(s):&nbsp;
69
          <font class="rowodd">Voice Number(s):</font>&nbsp;
64 70
          <xsl:for-each select="./contactInfo/phone/voice">
65 71
           <xsl:value-of select="." />
66 72
            <br />
......
68 74
        </xsl:if>
69 75
        
70 76
        <xsl:if test="count(./contactInfo/phone/facsimile) &gt; 0">
71
          Fax Number(s):&nbsp;
77
          <font class="rowodd">Fax Number(s):</font>&nbsp;
72 78
          <xsl:for-each select="./contactInfo/phone/facsimile">
73 79
            <xsl:value-of select="." />
74 80
            <br />
......
76 82
        </xsl:if>
77 83
        
78 84
        <xsl:if test="count(./contactInfo/phone/other) &gt; 0">
79
          Other Number(s):&nbsp;
85
          <font class="rowodd">Other Number(s):</font>&nbsp;
80 86
          <xsl:for-each select="./contactInfo/phone/other">
81 87
            <xsl:value-of select="." />
82 88
            &nbsp;&nbsp;
83
            <xsl:text>Number type:</xsl:text>
89
            <xsl:text><font class="rowodd">Number type:</font></xsl:text>
84 90
            <xsl:value-of select="/resource/*/*/contactInfo/phone/otherType" />
85 91
            <br />
86 92
          </xsl:for-each>
......
107 113
        </xsl:if>
108 114
        
109 115
        <xsl:if test="count(./contactInfo/hoursOfService) &gt; 0">
110
          Office hourse: &nbsp;
116
          <font class="rowodd">Office hourse:</font> &nbsp;
111 117
          <xsl:value-of select="./contactInfo/hoursOfService" />
112 118
          <br/>
113 119
        </xsl:if>
114 120
        
115 121
        <xsl:if test="count(./contactInfo/contactInstructions) &gt; 0">
116
          Contact instructions:&nbsp;
122
          <font class="rowodd">Contact instructions:</font>&nbsp;
117 123
          <xsl:value-of select="./contactInfo/contactInstructions" />
118 124
          <br/>
119 125
        </xsl:if>
120 126
        
121
        <hr />
127
        <br/>
122 128
      </xsl:for-each>
123 129
      
130
      <h3 class="rowlight">Publishing Information</h3>
131
      <xsl:if test="count(resource/*/publisher) &gt; 0">
132
        <font class="rowodd">Publisher:</font> 
133
        
134
        <xsl:value-of select="resource/*/publisher/individualName/salutation" />
135
        &nbsp;
136
        <xsl:value-of select="resource/*/publisher/individualName/givenName" />&nbsp;
137
        <xsl:value-of select="resource/*/publisher/individualName/surName" />&nbsp;
138
        <br />
139
        <xsl:if test="count(resource/*/publisher/organizationName) &gt; 0">
140
          <xsl:value-of select="resource/*/publisher/organizationName" />
141
          <br />
142
        </xsl:if>
143
        
144
        <xsl:if test="count(resource/*/publisher/contactInfo/phone/voice) &gt; 0">
145
          <font class="rowodd">Voice Number(s):</font>&nbsp;
146
          <xsl:for-each select="resource/*/publisher/contactInfo/phone/voice">
147
           <xsl:value-of select="." />
148
            <br />
149
          </xsl:for-each>
150
        </xsl:if>
151
        
152
        <xsl:if test="count(resource/*/publisher/contactInfo/phone/facsimile) &gt; 0">
153
          <font class="rowodd">Fax Number(s):</font>&nbsp;
154
          <xsl:for-each select="resource/*/publisher/contactInfo/phone/facsimile">
155
            <xsl:value-of select="." />
156
            <br />
157
          </xsl:for-each>
158
        </xsl:if>
159
        
160
        <xsl:if test="count(resource/*/publisher/contactInfo/phone/other) &gt; 0">
161
          <font class="rowodd">Other Number(s):</font>&nbsp;
162
          <xsl:for-each select="resource/*/publisher/contactInfo/phone/other">
163
            <xsl:value-of select="." />
164
            &nbsp;&nbsp;
165
            <xsl:text>Number type:</xsl:text>
166
            <xsl:value-of select="/resource/*/*/contactInfo/phone/otherType" />
167
            <br />
168
          </xsl:for-each>
169
        </xsl:if>
170
        
171
        <xsl:if test="count(resource/*/publisher/contactInfo/address) &gt; 0">
172
          <xsl:value-of 
173
           select="resource/*/publisher/contactInfo/address/deliveryPoint" />
174
           <br/>
175
          <xsl:value-of 
176
           select="resource/*/publisher/contactInfo/address/city" />,&nbsp;
177
          <xsl:value-of 
178
           select="resource/*/publisher/contactInfo/address/administrativeArea"/>
179
           &nbsp;
180
          <xsl:value-of 
181
           select="resource/*/publisher/contactInfo/address/postalCode" />
182
           &nbsp;<br/>
183
          <xsl:value-of 
184
           select="resource/*/publisher/contactInfo/address/country" /><br/>
185
          <xsl:value-of 
186
           select="resource/*/publisher/contactInfo/address/electronicMailAddress" />
187
          <br/>
188
        </xsl:if>
189
          
190
        <xsl:if test="count(resource/*/publisher/onlineResource) &gt; 0">
191
          <xsl:value-of 
192
           select="resource/*/publisher/onlineResource/linkage/URL" /><br/>
193
          <xsl:value-of 
194
           select="resource/*/publisher/onlineResource/protocol" /><br/>
195
          <xsl:value-of 
196
           select="resource/*/publisher/onlineResource/applicationProtocol" />
197
           <br/>
198
          <xsl:value-of 
199
           select="resource/*/publisher/onlineResource/linkage/name" /><br/>
200
          <xsl:value-of 
201
           select="resource/*/publisher/onlineResource/linkage/description" />
202
           <br/>
203
          <xsl:value-of 
204
           select="resource/*/publisher/onlineResource/linkage/functionCode" />
205
           <br/>
206
          <br />
207
        </xsl:if>
208
        
209
        <xsl:if 
210
         test="count(resource/*/publisher/contactInfo/hoursOfService) &gt; 0">
211
          <font class="rowodd">Office hourse:</font> &nbsp;
212
          <xsl:value-of 
213
           select="resource/*/publisher/contactInfo/hoursOfService" />
214
          <br/>
215
        </xsl:if>
216
        
217
        <xsl:if 
218
         test="count(resource/*/publisher/contactInfo/contactInstructions) &gt; 0">
219
          <font class="rowodd">Contact instructions:</font>&nbsp;
220
          <xsl:value-of 
221
           select="resource/*/publisher/contactInfo/contactInstructions" />
222
          <br/>
223
        </xsl:if>
224
      </xsl:if>
225
      
226
      <xsl:if test="count(resource/*/pubdate) &gt; 0">
227
        <font class="rowodd">Publishing Date:</font>
228
        &nbsp; <xsl:value-of select="resource/*/pubdate" /><br/>
229
      </xsl:if>
230
      
231
      <xsl:if test="count(resource/*/pubplace) &gt; 0">
232
        <font class="rowodd">Publishing Place:</font> 
233
        &nbsp; <xsl:value-of select="resource/*/pubplace" />
234
        <br/>
235
      </xsl:if>
236
      
237
      <xsl:if test="count(resource/*/series) &gt; 0">
238
        <font class="rowodd">Series:</font> &nbsp; <xsl:value-of select="resource/*/series" /><br/>
239
      </xsl:if>
240
      
241
      <h3 class="rowlight">Other Information</h3>
242
      <xsl:if test="count(resource/*/additionalInfo) &gt; 0">
243
        <font class="rowodd">Additional Information: </font>
244
        &nbsp; <xsl:value-of select="resource/*/additionalInfo" /><br/>
245
      </xsl:if>
246
      
247
      <xsl:if test="count(resource/*/abstract) &gt; 0">
248
        <font class="rowodd">Abstract:</font>
249
        &nbsp; <xsl:value-of select="resource/*/abstract" /><br/>
250
      </xsl:if>
251
      
252
      <xsl:for-each select="resource/*/url">
253
        <font class="rowodd">URL:</font> &nbsp; 
254
        <a>
255
        <xsl:attribute name="href">
256
          <xsl:value-of select="./URL" />
257
        </xsl:attribute>
258
        <xsl:value-of select="./URL" /><br/>
259
        </a>
260
      </xsl:for-each>
261
      <br/>
262
      
263
      <xsl:if test="count(resource/*/keywordInfo) &gt; 0">
264
        <h3 class="rowlight">Keywords</h3>
265
        <table width="50%" border="1">
266
        <tr class="rowodd">
267
          <th>Keyword</th><th>Keyword Type</th><th>Keyword Thesauri</th>
268
        </tr>
269
       
270
        <xsl:for-each select="resource/*/keywordInfo">
271
          <tr valign="top">
272
            <xsl:attribute name="class">
273
              <xsl:choose>
274
                <xsl:when test="position() mod 2 = 1">rowwhite</xsl:when>
275
                <xsl:when test="position() mod 2 = 0">rowlight</xsl:when>
276
              </xsl:choose>
277
            </xsl:attribute>
278
            <td>
279
              <xsl:value-of select="./keyword"/>, &nbsp;
280
            </td>
281
            <td>
282
              <xsl:value-of select="./keywordType"/>
283
            </td>
284
            <td>
285
              <xsl:for-each select="./keywordThesaurus">
286
                <xsl:value-of select="."/><br/>
287
              </xsl:for-each>
288
            </td>
289
          </tr>
290
        </xsl:for-each>
291

  
292
        </table>
293
      </xsl:if>
294
      
124 295
    </body>
125 296
    </html>
126 297
  </xsl:template>

Also available in: Unified diff