1 |
43586
|
sandro.lab
|
<RESOURCE_PROFILE>
|
2 |
|
|
<HEADER>
|
3 |
|
|
<RESOURCE_IDENTIFIER
|
4 |
|
|
value="d55a2e23-4bae-47a6-9056-980839773621_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
5 |
|
|
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
|
6 |
|
|
<RESOURCE_KIND value="TransformationRuleDSResources"/>
|
7 |
|
|
<RESOURCE_URI value=""/>
|
8 |
|
|
<DATE_OF_CREATION value="2014-11-19T11:05:55+01:00"/>
|
9 |
|
|
</HEADER>
|
10 |
|
|
<BODY>
|
11 |
|
|
<CONFIGURATION>
|
12 |
|
|
<IMPORTED/>
|
13 |
|
|
<SCRIPT>
|
14 |
|
|
<TITLE>OAI_ICPSR transform</TITLE>
|
15 |
|
|
<CODE><![CDATA[
|
16 |
|
|
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
17 |
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
18 |
|
|
xmlns:datetime="http://exslt.org/dates-and-times" xmlns:exslt="http://exslt.org/common"
|
19 |
|
|
xmlns:oai="http://www.openarchives.org/OAI/2.0/"
|
20 |
|
|
xmlns:dri="http://www.driver-repository.eu/namespace/dri" xmlns:dli="http://www.dli.eu"
|
21 |
|
|
xmlns:ddi="ddi:codebook:2_5"
|
22 |
|
|
exclude-result-prefixes="xsl datetime exslt ddi">
|
23 |
|
|
|
24 |
|
|
<xsl:template match="/">
|
25 |
|
|
<xsl:choose>
|
26 |
|
|
<xsl:when test="not(//ddi:relPubl)">
|
27 |
|
|
<record> </record>
|
28 |
|
|
</xsl:when>
|
29 |
|
|
<xsl:when test="not(//ddi:stdyDscr/ddi:citation/ddi:holdings)">
|
30 |
|
|
<record> </record>
|
31 |
|
|
</xsl:when>
|
32 |
|
|
<xsl:otherwise>
|
33 |
|
|
<record>
|
34 |
|
|
<xsl:copy-of select="//*[local-name()='header']"/>
|
35 |
|
|
<metadata>
|
36 |
|
|
|
37 |
|
|
|
38 |
|
|
<xsl:variable name="namespacePrefix">
|
39 |
|
|
<xsl:value-of select="//*[local-name()='header']/*[local-name()='datasourceprefix']"/>
|
40 |
|
|
</xsl:variable>
|
41 |
|
|
<dli:dliObject>
|
42 |
|
|
<dnetResourceIdentifier>
|
43 |
|
|
<xsl:value-of
|
44 |
|
|
select="//*[local-name()='header']/*[local-name()='objIdentifier']"
|
45 |
|
|
/>
|
46 |
|
|
</dnetResourceIdentifier>
|
47 |
|
|
<localIdentifier type="doi">
|
48 |
|
|
<xsl:choose>
|
49 |
|
|
<xsl:when test="//ddi:stdyDscr/ddi:citation/ddi:holdings">
|
50 |
|
|
<xsl:value-of select="//ddi:stdyDscr/ddi:citation/ddi:holdings"/>
|
51 |
|
|
</xsl:when>
|
52 |
|
|
</xsl:choose>
|
53 |
|
|
</localIdentifier>
|
54 |
|
|
<provenance>
|
55 |
|
|
<datasource>
|
56 |
|
|
<xsl:attribute name="completionStatus">complete</xsl:attribute>
|
57 |
|
|
<xsl:attribute name="provisionMode">collected</xsl:attribute>
|
58 |
|
|
<xsl:value-of select="$namespacePrefix" />
|
59 |
|
|
</datasource>
|
60 |
|
|
</provenance>
|
61 |
|
|
<xsl:for-each
|
62 |
|
|
select="//ddi:stdyDscr/ddi:citation/ddi:titlStmt/ddi:titl">
|
63 |
|
|
<title>
|
64 |
|
|
<xsl:value-of select="."/>
|
65 |
|
|
</title>
|
66 |
|
|
</xsl:for-each>
|
67 |
|
|
<xsl:for-each
|
68 |
|
|
select="//ddi:stdyDscr/ddi:citation/ddi:distStmt/ddi:distDate">
|
69 |
|
|
<date> <xsl:value-of select="." /> </date>
|
70 |
|
|
</xsl:for-each>
|
71 |
|
|
<objectType>dataset</objectType>
|
72 |
|
|
<xsl:for-each
|
73 |
|
|
select="//ddi:stdyDscr/ddi:citation/ddi:rspStmt">
|
74 |
|
|
<authors>
|
75 |
|
|
<xsl:for-each select=".//ddi:AuthEnty">
|
76 |
|
|
<author>
|
77 |
|
|
<fullname>
|
78 |
|
|
<xsl:value-of
|
79 |
|
|
select="."/>
|
80 |
|
|
</fullname>
|
81 |
|
|
</author>
|
82 |
|
|
</xsl:for-each>
|
83 |
|
|
</authors>
|
84 |
|
|
</xsl:for-each>
|
85 |
|
|
<relations>
|
86 |
|
|
<xsl:for-each select="//ddi:othrStdyMat/ddi:relPubl">
|
87 |
|
|
<relation>
|
88 |
|
|
<extra_info>
|
89 |
|
|
<relatedtype>publication</relatedtype>
|
90 |
|
|
<relatedtitle><xsl:value-of select="ddi:citation/ddi:titlStmt/ddi:titl"/></relatedtitle>
|
91 |
|
|
<relatedauthors>
|
92 |
|
|
<xsl:for-each select="ddi:citation/ddi:rspStmt/ddi:AuthEnty">
|
93 |
|
|
<relatedauthor><xsl:value-of select="."/> </relatedauthor>
|
94 |
|
|
</xsl:for-each>
|
95 |
|
|
</relatedauthors>
|
96 |
|
|
<relateddate>
|
97 |
|
|
<xsl:value-of select="ddi:citation/ddi:prodStmt/ddi:prodDate"/>
|
98 |
|
|
</relateddate>
|
99 |
|
|
</extra_info>
|
100 |
|
|
<xsl:variable name="relationType"><xsl:value-of select="isCitedBy"/> </xsl:variable>
|
101 |
|
|
<pid>
|
102 |
|
|
<xsl:choose>
|
103 |
|
|
<xsl:when test="./ddi:citation/ddi:holdings">
|
104 |
|
|
<xsl:attribute name="type"><xsl:value-of select="string('doi')"/></xsl:attribute>
|
105 |
|
|
<xsl:value-of select="./ddi:citation/ddi:holdings"/>
|
106 |
|
|
</xsl:when>
|
107 |
|
|
<xsl:otherwise>
|
108 |
|
|
<xsl:attribute name="type">
|
109 |
|
|
<xsl:attribute name="type"><xsl:value-of select="string('ICPSR')"/></xsl:attribute>
|
110 |
|
|
</xsl:attribute>
|
111 |
|
|
<xsl:value-of select="./ddi:citation/ddi:titlStmt/ddi:IDNo"/>
|
112 |
|
|
</xsl:otherwise>
|
113 |
|
|
</xsl:choose>
|
114 |
|
|
</pid>
|
115 |
|
|
<typeOfRelation>isCitedBy</typeOfRelation>
|
116 |
|
|
</relation>
|
117 |
|
|
</xsl:for-each>
|
118 |
|
|
</relations>
|
119 |
|
|
</dli:dliObject>
|
120 |
|
|
</metadata>
|
121 |
|
|
</record>
|
122 |
|
|
</xsl:otherwise>
|
123 |
|
|
</xsl:choose>
|
124 |
|
|
</xsl:template>
|
125 |
|
|
</xsl:stylesheet>
|
126 |
|
|
|
127 |
|
|
]]></CODE>
|
128 |
|
|
</SCRIPT>
|
129 |
|
|
</CONFIGURATION>
|
130 |
|
|
<STATUS/>
|
131 |
|
|
<SECURITY_PARAMETERS/>
|
132 |
|
|
</BODY>
|
133 |
|
|
</RESOURCE_PROFILE>
|