Project

General

Profile

« Previous | Next » 

Revision 829

Added by Matt Jones over 22 years ago

More fully completed the eml-dataset XSLT stylesheet for translating
into HTML format. Now more of the relevant fields are completed, and
the coverages are shown. Still need to systematically address every
field that could be present, but I hit the major ones.

View differences:

lib/style/eml-dataset-display.xsl
45 45
          <h3>Ecological Metadata Language</h3>
46 46
        </center>
47 47
        <table width="100%">
48
        <xsl:apply-templates select="/dataset/identifier" mode="layout"/>
49 48
        <xsl:apply-templates select="/dataset/title" mode="layout"/>
50 49
        <xsl:apply-templates select="/dataset/shortName" mode="layout"/>
50
        <xsl:apply-templates select="/dataset/identifier" mode="layout"/>
51 51
        </table>
52 52

  
53 53
        <xsl:apply-templates/>      
54 54

  
55
        <table width="100%">
56
        <tr><td class="highlight">
57
        <b><xsl:text>Keywords:</xsl:text></b>
58
        </td></tr>
59
        <tr><td>
60
          <ul>
61
            <xsl:for-each select="//keywordSet/keyword">
62
              <li><xsl:value-of select="."/></li>
63
            </xsl:for-each>
64
          </ul>
65
        </td></tr>
66
        </table>
67
         
68 55

  
69 56
        <table width="100%">
70 57
        <tr><td class="highlight">
......
74 61
        <ul>
75 62
          <xsl:for-each select="//triple">
76 63
            <li>
77
             <xsl:value-of select="./subject"/>
64
             <a><xsl:attribute name="href"><![CDATA[@html-path@/servlet/metacat?action=read&qformat=html&docid=]]><xsl:value-of select="./subject"/></xsl:attribute><xsl:value-of select="./subject"/></a>
78 65
             <xsl:text> </xsl:text>
79 66
             <xsl:value-of select="./relationship"/>
80 67
             <xsl:text> </xsl:text>
81
             <xsl:value-of select="./object"/>
68
             <a><xsl:attribute name="href"><![CDATA[@html-path@/servlet/metacat?action=read&qformat=html&docid=]]><xsl:value-of select="./object"/></xsl:attribute><xsl:value-of select="./object"/></a>
82 69
            </li>
83 70
          </xsl:for-each>
84 71
        </ul>
......
136 123
  </xsl:template>
137 124

  
138 125
  <xsl:template match="organizationName">
139
    <br><b><xsl:value-of select="."/></b></br>
126
    <b><xsl:value-of select="."/></b><br />
140 127
  </xsl:template>
141 128

  
142 129
  <xsl:template match="individualName">
143
    <br>
144 130
    <b>
145 131
       <xsl:value-of select="./salutation"/>
146 132
       <xsl:text> </xsl:text>
147 133
       <xsl:value-of select="./givenName"/>
148 134
       <xsl:text> </xsl:text>
149 135
       <xsl:value-of select="./surName"/>
150
    </b></br>
136
    </b><br />
151 137
  </xsl:template>
152 138

  
153 139
  <xsl:template match="address">
......
172 158
  </xsl:template>
173 159

  
174 160
  <xsl:template match="phone">
175
      <xsl:text>Phone: </xsl:text><xsl:value-of select="."/><br/>
161
      <xsl:text>Phone: </xsl:text><xsl:value-of select="."/><br />
176 162
  </xsl:template>
177 163

  
178 164
  <xsl:template match="electronicMailAddress">
179
      <xsl:text>Email: </xsl:text><xsl:value-of select="."/><br/>
165
      <xsl:text>Email: </xsl:text><xsl:value-of select="."/><br />
180 166
  </xsl:template>
181 167

  
182 168
  <xsl:template match="onlineLink">
183
      <xsl:text>URL: </xsl:text><xsl:value-of select="."/><br/>
169
      <xsl:text>URL: </xsl:text><xsl:value-of select="."/><br />
184 170
  </xsl:template>
185 171

  
186 172
  <xsl:template match="role">
187
      <xsl:text>Role: </xsl:text><xsl:value-of select="."/><br/>
173
      <xsl:text>Role: </xsl:text><xsl:value-of select="."/><br />
188 174
  </xsl:template>
189 175

  
190 176
  <xsl:template match="abstract">
......
217 203
    </tr></table>
218 204
  </xsl:template>
219 205

  
220
  <xsl:template match="keywordSet"/>
206
  <xsl:template match="onlineURL">
207
    <table width="100%">
208
    <tr>
209
    <td class="highlight"><b><xsl:text>Online Distribution information:</xsl:text></b></td>
210
    </tr>
211
    <tr>
212
    <td><a>
213
          <xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute>
214
          <xsl:value-of select="."/>
215
        </a>
216
    </td>
217
    </tr></table>
218
  </xsl:template>
219

  
220
  <xsl:template match="offlineMedium">
221
    <table width="100%">
222
    <tr>
223
    <td class="highlight"><b><xsl:text>Offline Distribution information:</xsl:text></b></td>
224
    </tr>
225
    <xsl:apply-templates/>
226
    </table>
227
  </xsl:template>
228

  
229
  <xsl:template match="medName">
230
    <tr><td><xsl:text>Medium: </xsl:text><xsl:value-of select="."/></td></tr>
231
  </xsl:template>
232

  
233
  <xsl:template match="temporalCov">
234
    <table width="100%">
235
    <tr>
236
    <td class="highlight"><b><xsl:text>Temporal Coverage:</xsl:text></b></td>
237
    </tr>
238
    <xsl:apply-templates/>
239
    </table>
240
  </xsl:template>
241

  
242
  <xsl:template match="rngdates">
243
    <tr><td>
244
    <xsl:text>Date Range: </xsl:text>
245
    <xsl:apply-templates select="begdate"/>
246
    <xsl:text> </xsl:text><xsl:apply-templates select="begtime"/>
247
    <xsl:text> </xsl:text><xsl:apply-templates select="beggeol"/>
248
    <xsl:text> to </xsl:text>
249
    <xsl:apply-templates select="enddate"/>
250
    <xsl:text> </xsl:text><xsl:apply-templates select="endtime"/>
251
    <xsl:text> </xsl:text><xsl:apply-templates select="endgeol"/>
252
    </td></tr>
253
  </xsl:template>
254

  
255
  <xsl:template match="sngdate">
256
    <tr><td>
257
    <xsl:text>Date: </xsl:text>
258
    <xsl:apply-templates select="caldate"/>
259
    <xsl:text> </xsl:text><xsl:apply-templates select="time"/>
260
    <xsl:text> </xsl:text><xsl:apply-templates select="geolage"/>
261
    </td></tr>
262
  </xsl:template>
263

  
264
  <xsl:template match="mdattim">
265
    <xsl:apply-templates/>
266
  </xsl:template>
267

  
268
  <xsl:template match="geographicCov">
269
    <table width="100%">
270
    <tr>
271
    <td class="highlight"><b><xsl:text>Geographic Coverage:</xsl:text></b></td>
272
    </tr>
273
    <tr><td><xsl:apply-templates/></td></tr>
274
    </table>
275
  </xsl:template>
276

  
277
  <xsl:template match="descgeog">
278
    <p>
279
    <xsl:text>Description: </xsl:text>
280
    <xsl:value-of select="."/>
281
    </p>
282
  </xsl:template>
283

  
284
  <xsl:template match="westbc">
285
    <xsl:text>West Bounding coordinate: </xsl:text>
286
    <xsl:value-of select="."/> degrees<br />
287
  </xsl:template>
288

  
289
  <xsl:template match="eastbc">
290
    <xsl:text>East Bounding coordinate: </xsl:text>
291
    <xsl:value-of select="."/> degrees<br />
292
  </xsl:template>
293

  
294
  <xsl:template match="northbc">
295
    <xsl:text>North Bounding coordinate: </xsl:text>
296
    <xsl:value-of select="."/> degrees<br />
297
  </xsl:template>
298

  
299
  <xsl:template match="southbc">
300
    <xsl:text>South Bounding coordinate: </xsl:text>
301
    <xsl:value-of select="."/> degrees<br />
302
  </xsl:template>
303

  
304
  <xsl:template match="taxonomicCov">
305
    <table width="100%">
306
    <tr>
307
    <td class="highlight"><b><xsl:text>Taxomomic Coverage:</xsl:text></b></td>
308
    </tr>
309
    <tr><td><xsl:apply-templates/></td></tr>
310
    </table>
311
  </xsl:template>
312

  
313
  <xsl:template match="keywtax">
314
    <p>
315
    <xsl:text>Taxon Keywords: </xsl:text>
316
    <xsl:apply-templates select="taxonkey"/>
317
    </p>
318
  </xsl:template>
319

  
320
  <xsl:template match="taxoncl">
321
    <p class="indent">
322
    <xsl:text>Name: </xsl:text><xsl:value-of select="taxonrv"/>
323
    <a target="itisca">
324
      <xsl:attribute name="href"><xsl:text><![CDATA[http://sis.agr.gc.ca/pls/itisca/taxastep?king=every&p_action=containing&p_ifx=aafc&taxa=]]></xsl:text><xsl:value-of select="taxonrv"/></xsl:attribute>
325
      Check ITIS*ca for this taxon
326
    </a>
327
    <br />
328
    <xsl:text>Rank: </xsl:text><xsl:value-of select="taxonrn"/><br />
329
    <xsl:text>Common name: </xsl:text><xsl:value-of select="common"/><br />
330
    <xsl:apply-templates select="taxoncl"/>
331
    </p>
332
  </xsl:template>
333

  
334
  <xsl:template match="keywordSet">
335
    <table width="100%">
336
    <tr><td class="highlight">
337
    <b><xsl:text>Keywords:</xsl:text></b>
338
    </td></tr>
339
    <xsl:if test="./keywordThesaurus">
340
      <tr><td>Thesaurus: <xsl:value-of select="keywordThesaurus"/></td></tr>
341
    </xsl:if>
342
    <tr><td>
343
      <ul>
344
        <xsl:for-each select="keyword">
345
          <li><xsl:value-of select="."/> 
346
          <xsl:if test="./@keywordType">
347
            (<xsl:value-of select="./@keywordType"/>)
348
          </xsl:if>
349
          </li>
350
        </xsl:for-each>
351
      </ul>
352
    </td></tr>
353
    </table>
354
  </xsl:template>
355
         
221 356
  <xsl:template match="triple"/>
222 357

  
223 358
</xsl:stylesheet>

Also available in: Unified diff