1
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
3
|
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
|
4
|
|
5
|
<xsl:template match="/">
|
6
|
<RESOURCE_PROFILE>
|
7
|
<HEADER>
|
8
|
<RESOURCE_IDENTIFIER value=""/>
|
9
|
<RESOURCE_TYPE value="VocabularyDSResourceType"/>
|
10
|
<RESOURCE_KIND value="VocabularyDSResources"/>
|
11
|
<RESOURCE_URI value="String"/>
|
12
|
<DATE_OF_CREATION value="2008-06-25T14:50:49+02:00"/>
|
13
|
</HEADER>
|
14
|
<BODY>
|
15
|
<CONFIGURATION>
|
16
|
<VOCABULARY_NAME>Projects</VOCABULARY_NAME>
|
17
|
<VOCABULARY_DESCRIPTION>Projects Vocabulary</VOCABULARY_DESCRIPTION>
|
18
|
<TERMS>
|
19
|
|
20
|
<xsl:apply-templates select="/response/results"/>
|
21
|
</TERMS>
|
22
|
</CONFIGURATION>
|
23
|
</BODY>
|
24
|
</RESOURCE_PROFILE>
|
25
|
|
26
|
|
27
|
</xsl:template>
|
28
|
|
29
|
<xsl:template match = "//result">
|
30
|
<xsl:choose>
|
31
|
<xsl:when test="./acronym != '' and ./acronym != 'UNKNOWN'">
|
32
|
<TERM native_name="">
|
33
|
<xsl:attribute name="encoding"><xsl:value-of select="field[@name='encoding']/@value"/></xsl:attribute>
|
34
|
<xsl:attribute name="english_name"><xsl:value-of select="field[@name='acronym']/@value"/></xsl:attribute>
|
35
|
<SYNONYMS/>
|
36
|
</TERM>
|
37
|
</xsl:when>
|
38
|
<xsl:otherwise>
|
39
|
<TERM native_name="">
|
40
|
<xsl:attribute name="encoding"><xsl:value-of select="field[@name='encoding']/@value"/></xsl:attribute>
|
41
|
<xsl:attribute name="english_name"><xsl:value-of select="field[@name='title']/@value"/></xsl:attribute>
|
42
|
<SYNONYMS/>
|
43
|
</TERM>
|
44
|
</xsl:otherwise>
|
45
|
</xsl:choose>
|
46
|
</xsl:template>
|
47
|
</xsl:stylesheet>
|
48
|
|