1
|
<?xml version="1.0"?>
|
2
|
<!--
|
3
|
* eml-dataset.xsl
|
4
|
*
|
5
|
* Authors: Matt Jones
|
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 April 5
|
10
|
* Version: 0.01
|
11
|
* File Info: '$Id: eml-dataset.xsl 34 2000-04-13 16:42:03Z jones $'
|
12
|
*
|
13
|
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
|
14
|
* convert an XML file that is the result of a SQL query using Oracle's
|
15
|
* XSQL tool to another XML file that is valid with respect to the
|
16
|
* eml-dataset.dtd module of Ecological Metadata Language (EML)
|
17
|
-->
|
18
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
19
|
|
20
|
<xsl:template match="/">
|
21
|
<?xml-stylesheet type="text/xsl" href="eml-dataset-display.xsl"?>
|
22
|
<eml-dataset>
|
23
|
<xsl:apply-templates/>
|
24
|
</eml-dataset>
|
25
|
</xsl:template>
|
26
|
|
27
|
<xsl:template match="originator">
|
28
|
<originator>
|
29
|
<xsl:choose>
|
30
|
<xsl:when test="party_org">
|
31
|
<party><party_org><xsl:value-of select="."/></party_org></party>
|
32
|
</xsl:when>
|
33
|
<xsl:otherwise>
|
34
|
<party>
|
35
|
<party_individual>
|
36
|
<xsl:for-each select="salutation|given_name|surname|jobtitle">
|
37
|
<xsl:copy-of select="."/>
|
38
|
</xsl:for-each>
|
39
|
</party_individual>
|
40
|
</party>
|
41
|
</xsl:otherwise>
|
42
|
</xsl:choose>
|
43
|
<meta_address>
|
44
|
<xsl:for-each select="address|city|admin_area|postal_code|country|resource_url|email|work_phone|home_phone|fax|tdd_phone">
|
45
|
<xsl:copy-of select="."/>
|
46
|
</xsl:for-each>
|
47
|
</meta_address>
|
48
|
</originator>
|
49
|
</xsl:template>
|
50
|
|
51
|
<xsl:template match="meta_file_id|dataset_id|title|abstract|keyword_info">
|
52
|
<xsl:copy-of select="."/>
|
53
|
</xsl:template>
|
54
|
|
55
|
</xsl:stylesheet>
|