comparison DVN-web/installer/dvninstall/config/dcmi_terms2ddi.xsl @ 6:1b2188262ae9

adding the installer.
author "jurzua <jurzua@mpiwg-berlin.mpg.de>"
date Wed, 13 May 2015 11:50:21 +0200
parents
children
comparison
equal deleted inserted replaced
5:dd9adfc73390 6:1b2188262ae9
1 <xsl:stylesheet version="1.0"
2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:dc="http://purl.org/dc/terms/"
4 exclude-result-prefixes="dc"
5 >
6 <xsl:output method="xml" version="1.0" encoding="UTF-8"
7 indent="yes" />
8 <xsl:template match="/">
9 <codeBook
10 xmlns="http://www.icpsr.umich.edu/DDI"
11 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
12 xsi:schemaLocation="http://www.icpsr.umich.edu/DDI
13 http://www.icpsr.umich.edu/DDI/Version2-0.xsd">
14 <stdyDscr>
15 <citation>
16 <titlStmt>
17 <titl>
18 <xsl:for-each select="//dc:title">
19 <xsl:value-of select="."/>
20 </xsl:for-each>
21 </titl>
22 <xsl:for-each select="//dc:identifier">
23 <IDNo>
24 <xsl:attribute name="agency">
25 <xsl:choose>
26 <xsl:when test='starts-with(.,"hdl:")'>handle</xsl:when>
27 <xsl:when test='starts-with(.,"http://hdl.handle.net/")'>handle</xsl:when>
28 </xsl:choose>
29 </xsl:attribute>
30 <xsl:choose>
31 <xsl:when test='starts-with(.,"http://hdl.handle.net/")'>hdl:<xsl:value-of select='substring(.,23)'/></xsl:when>
32 <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
33 </xsl:choose>
34 </IDNo>
35 </xsl:for-each>
36 </titlStmt>
37 <rspStmt>
38 <xsl:for-each select="//dc:creator">
39 <AuthEnty><xsl:value-of select="."/></AuthEnty>
40 </xsl:for-each>
41 </rspStmt>
42
43 <prodStmt>
44 <xsl:for-each select="//dc:publisher">
45 <xsl:if test="normalize-space(.)!=''">
46 <producer>
47 <xsl:value-of select="."/>
48 </producer>
49 </xsl:if>
50 </xsl:for-each>
51
52 <xsl:for-each select="//dc:date">
53 <xsl:if test="normalize-space(.)!=''">
54 <prodDate>
55 <xsl:value-of select="normalize-space(.)"/>
56 </prodDate>
57 </xsl:if>
58 </xsl:for-each>
59 </prodStmt>
60
61 </citation>
62 <stdyInfo>
63 <subject>
64 <xsl:for-each select="//dc:subject">
65 <keyword><xsl:value-of select="."/></keyword>
66 </xsl:for-each>
67 </subject>
68 <xsl:for-each select="//dc:description">
69 <abstract>
70 <xsl:value-of select="."/>
71 </abstract>
72 </xsl:for-each>
73 <sumDscr>
74 <xsl:for-each select="//dc:coverage">
75 <xsl:if test="normalize-space(.)!=''">
76 <geogCover>
77 <xsl:value-of select="."/>
78 </geogCover>
79 </xsl:if>
80 </xsl:for-each>
81 <xsl:for-each select="//dc:type">
82 <xsl:if test="normalize-space(.)!=''">
83 <dataKind>
84 <xsl:value-of select="."/>
85 </dataKind>
86 </xsl:if>
87 </xsl:for-each>
88 </sumDscr>
89 </stdyInfo>
90
91 <xsl:if test="normalize-space(//dc:source)!=''">
92 <method>
93 <dataColl>
94 <sources>
95 <xsl:for-each select="//dc:source">
96 <xsl:if test="normalize-space(.)!=''">
97 <dataSrc>
98 <xsl:value-of select="normalize-space(.)"/>
99 </dataSrc>
100 </xsl:if>
101 </xsl:for-each>
102 </sources>
103 </dataColl>
104 </method>
105 </xsl:if>
106
107
108 <xsl:for-each select="//dc:rights">
109 <xsl:if test="normalize-space(.)!=''">
110 <dataAccs>
111 <useStmt>
112 <restrctn>
113 <xsl:value-of select="normalize-space(.)"/>
114 </restrctn>
115 </useStmt>
116 </dataAccs>
117 </xsl:if>
118 </xsl:for-each>
119 <xsl:if test="normalize-space(//dc:relation)!='' or normalize-space(//dc:isReferencedBy)!=''">
120 <othrStdyMat>
121 <xsl:for-each select="//dc:relation">
122 <xsl:if test="normalize-space(.)!=''">
123 <relMat>
124 <xsl:value-of select="normalize-space(.)"/>
125 </relMat>
126 </xsl:if>
127 </xsl:for-each>
128 <xsl:for-each select="//dc:isReferencedBy">
129 <relPubl>
130 <citation source="DVN_3_0">
131 <titlStmt>
132 <IDNo>
133 <xsl:attribute name="agency">
134 <xsl:value-of select="normalize-space(./@agency)"/>
135 </xsl:attribute>
136 <xsl:value-of select="normalize-space(./@IDNo)"/>
137 </IDNo>
138 </titlStmt>
139 <biblCit><xsl:value-of select="normalize-space(.)"/></biblCit>
140 <holdings>
141 <xsl:attribute name="URI">
142 <xsl:value-of select="normalize-space(./@holdingsURI)"/>
143 </xsl:attribute>
144 <xsl:value-of select="normalize-space(./@holdingsURI)"/>
145 </holdings>
146 </citation>
147 </relPubl>
148 </xsl:for-each>
149 </othrStdyMat>
150 </xsl:if>
151 </stdyDscr>
152 </codeBook>
153 </xsl:template>
154 </xsl:stylesheet>
155
156