Revision 49054
Added by Sandro La Bruzzo over 6 years ago
oai_ands_transform.xml | ||
---|---|---|
16 | 16 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
17 | 17 |
xmlns:datetime="http://exslt.org/dates-and-times" xmlns:exslt="http://exslt.org/common" |
18 | 18 |
xmlns:oai="http://www.openarchives.org/OAI/2.0/" |
19 |
xmlns:dnet="eu.dnetlib.dli.DLIUtils" |
|
20 | 19 |
xmlns:dc="http://purl.org/dc/elements/1.1/" |
20 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
21 | 21 |
xmlns:oaf="http://namespace.dnet.eu/oaf" |
22 |
xmlns:stringutils="org.apache.commons.lang3.StringUtils"
|
|
23 |
exclude-result-prefixes="xsl datetime exslt dnet stringutils">
|
|
22 |
xmlns:dnet="eu.dnetlib.dli.DLIUtils"
|
|
23 |
exclude-result-prefixes="xsl datetime exslt dnet"> |
|
24 | 24 |
<xsl:template match="/"> |
25 |
<xsl:choose> |
|
26 |
<xsl:when test="not(//*[local-name()='relatedInfo'])"> |
|
27 |
<record></record> |
|
28 |
</xsl:when> |
|
29 |
<xsl:when test="not(//*[local-name()='setSpec' and ./text()='class:collection'])"> |
|
30 |
<record></record> |
|
31 |
</xsl:when> |
|
25 |
<xsl:variable name="namespacePrefix" select="//dri:datasourceprefix"/> |
|
26 |
<xsl:variable name="pid"><xsl:value-of select="dnet:fixPID(//*[local-name()='source']/*[local-name()='identifier']/*[local-name()='identifier'])"/> </xsl:variable> |
|
27 |
<xsl:variable name="pidType"><xsl:value-of select="dnet:inferPidType(//*[local-name()='source']/*[local-name()='identifier']/*[local-name()='identifier'],//*[local-name()='source']/*[local-name()='identifier']/*[local-name()='schema'])"/> </xsl:variable> |
|
32 | 28 |
|
33 | 29 |
|
34 |
<xsl:otherwise> |
|
35 |
<xsl:variable name="pid"> |
|
36 |
<xsl:value-of |
|
37 |
select="concat('https://researchdata.ands.org.au/registry/registry_object/view/',stringutils:substringAfter(//*[local-name()='header']/*[local-name()='recordIdentifier'],'::'))"/> |
|
38 |
</xsl:variable> |
|
30 |
<xsl:variable name="relatedPid"><xsl:value-of select="dnet:fixPID(//*[local-name()='target']/*[local-name()='identifier']/*[local-name()='identifier'])"/> </xsl:variable> |
|
31 |
<xsl:variable name="relatedPidType"><xsl:value-of select="dnet:inferPidType(//*[local-name()='target']/*[local-name()='identifier']/*[local-name()='identifier'],//*[local-name()='target']/*[local-name()='identifier']/*[local-name()='schema'])"/> </xsl:variable> |
|
39 | 32 |
|
40 |
<xsl:variable name="namespacePrefix"> |
|
41 |
<xsl:value-of select="//*[local-name()='header']/*[local-name()='datasourceprefix']"/> |
|
42 |
</xsl:variable> |
|
43 |
<xsl:variable name="datasourceID" select="dnet:getIdFromDataSourcePrefix($namespacePrefix)"/> |
|
44 |
<xsl:variable name="datasourceName" select="dnet:getNameFromDataSourcePrefix($namespacePrefix)"/> |
|
45 |
<pack> |
|
33 |
<xsl:variable name="relation"><xsl:value-of select="//*[local-name()='relationship']/*[local-name()='name']"/></xsl:variable> |
|
34 |
<xsl:variable name="inverseRelation"><xsl:value-of select="//*[local-name()='relationship']/*[local-name()='inverseRelationship']"/></xsl:variable> |
|
46 | 35 |
|
36 |
<xsl:variable name="targetType"> |
|
37 |
<xsl:choose> |
|
38 |
<xsl:when test="//*[local-name()='target']/*[local-name()='objectType']/*[local-name()='type'] ='dataset' or //*[local-name()='target']/*[local-name()='objectType']/*[local-name()='type']= 'collection'">dataset</xsl:when> |
|
39 |
<xsl:when test="//*[local-name()='target']/*[local-name()='objectType']/*[local-name()='type'] = 'literature' or //*[local-name()='target']/*[local-name()='objectType']/*[local-name()='type'] = 'publication'">publication</xsl:when> |
|
40 |
<xsl:otherwise>unknown</xsl:otherwise> |
|
41 |
</xsl:choose> |
|
42 |
</xsl:variable> |
|
47 | 43 |
|
44 |
<xsl:variable name="sourceType"> |
|
45 |
<xsl:choose> |
|
46 |
<xsl:when test="//*[local-name()='source']/*[local-name()='objectType']/*[local-name()='type'] ='dataset' or //*[local-name()='source']/*[local-name()='objectType']/*[local-name()='type']= 'collection'">dataset</xsl:when> |
|
47 |
<xsl:when test="//source/objectType/type = 'literature' or //source/objectType/type = 'publication'">publication</xsl:when> |
|
48 |
<xsl:otherwise>unknown</xsl:otherwise> |
|
49 |
</xsl:choose> |
|
50 |
</xsl:variable> |
|
51 |
<xsl:variable name="dnetSourceId"><xsl:value-of select="concat($namespacePrefix, '::', dnet:generateIdentifier(concat($pid, '::', $relatedPid), concat($pidType, '::', $relatedPidType)))"/></xsl:variable> |
|
52 |
<xsl:variable name="dnetTargetId"><xsl:value-of select="concat($namespacePrefix, '::', dnet:generateIdentifier(concat($relatedPid, '::', $pid), concat($relatedPidType, '::', $pidType)))"/></xsl:variable> |
|
53 |
<pack> |
|
54 |
<xsl:choose> |
|
55 |
<xsl:when test=".//*[local-name()='source']/*[local-name()='objectType']/*[local-name()='type'] = 'dataset' or .//*[local-name()='source']/*[local-name()='objectType']/*[local-name()='type'] = 'collection'"> |
|
48 | 56 |
<oai:record xmlns="http://namespace.openaire.eu/" |
49 |
xmlns:dc="http://purl.org/dc/elements/1.1/" |
|
50 |
xmlns:dr="http://www.driver-repository.eu/namespace/dr" |
|
51 |
xmlns:prov="http://www.openarchives.org/OAI/2.0/provenance" |
|
52 | 57 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
53 |
<xsl:copy-of select="//*[local-name()='header']"/> |
|
58 |
<oai:header> |
|
59 |
<dri:objIdentifier><xsl:value-of select="$dnetSourceId"/></dri:objIdentifier> |
|
60 |
<dri:recordIdentifier><xsl:value-of select="concat($pid, '::', $pidType)"/></dri:recordIdentifier> |
|
61 |
<dri:dateOfCollection><xsl:value-of select="//dri:dateOfCollection"/> </dri:dateOfCollection> |
|
62 |
<dri:repositoryId><xsl:value-of select="//dri:repositoryId"/></dri:repositoryId> |
|
63 |
<dri:datasourceprefix><xsl:value-of select="$namespacePrefix"/></dri:datasourceprefix> |
|
64 |
</oai:header> |
|
54 | 65 |
<metadata> |
55 | 66 |
<resource xmlns="http://datacite.org/schema/kernel-3" |
56 | 67 |
xsi:schemaLocation="http://datacite.org/schema/kernel-3 http://schema.datacite.org/meta/kernel-3/metadata.xsd"> |
57 |
<identifier identifierType="url">
|
|
68 |
<identifier identifierType="{$pidType}" >
|
|
58 | 69 |
<xsl:value-of select="$pid"/> |
59 | 70 |
</identifier> |
60 | 71 |
<titles> |
61 | 72 |
<xsl:for-each |
62 |
select="//*[local-name()='name' and ./@type='primary']/*[local-name()='namePart']">
|
|
73 |
select="//*[local-name()='source']/*[local-name()='title']">
|
|
63 | 74 |
<title> |
64 | 75 |
<xsl:value-of select="."/> |
65 | 76 |
</title> |
66 | 77 |
</xsl:for-each> |
67 | 78 |
</titles> |
79 |
<publisher > |
|
80 |
<xsl:value-of select="//*[local-name()='publisher']/*[local-name()='name']"/></publisher> |
|
68 | 81 |
<dates> |
69 |
<xsl:for-each select="//*[local-name()='date' and ./@type='dateTo']">
|
|
82 |
<xsl:for-each select="//*[local-name()='source']/*[local-name()='publicationDate']">
|
|
70 | 83 |
<date dateType="Collected"> |
71 | 84 |
<xsl:value-of select="."/> |
72 | 85 |
</date> |
73 | 86 |
</xsl:for-each> |
74 | 87 |
</dates> |
88 |
<creators> |
|
89 |
<xsl:for-each select="//*[local-name()='source']//*[local-name()='creatorName']"> |
|
90 |
<creator> |
|
91 |
<creatorName><xsl:value-of select="."/></creatorName> |
|
92 |
</creator> |
|
93 |
</xsl:for-each> |
|
94 |
</creators> |
|
75 | 95 |
<resourceType resourceTypeGeneral="Dataset">Dataset</resourceType> |
76 | 96 |
<relatedIdentifiers> |
77 |
<xsl:for-each select="//*[local-name()='relatedInfo']"> |
|
78 |
<xsl:if test="count(./*[local-name()='identifier']) > 0"> |
|
79 |
|
|
80 |
<xsl:variable name="relTypology"> |
|
81 |
<xsl:choose> |
|
82 |
<xsl:when test="./@type = 'publication'">publication</xsl:when> |
|
83 |
<xsl:otherwise>unknown</xsl:otherwise> |
|
84 |
</xsl:choose> |
|
85 |
</xsl:variable> |
|
86 |
<xsl:variable name="relatedIdType"> |
|
87 |
<xsl:choose> |
|
88 |
<xsl:when test="./@type = 'publication'">dnet</xsl:when> |
|
89 |
<xsl:otherwise> |
|
90 |
<xsl:value-of select="./*[local-name()='identifier']/@type"/> |
|
91 |
</xsl:otherwise> |
|
92 |
</xsl:choose> |
|
93 |
</xsl:variable> |
|
94 |
|
|
95 |
<xsl:variable name="relatedId"> |
|
96 |
<xsl:choose> |
|
97 |
<xsl:when test="./@type = 'publication'"> |
|
98 |
<xsl:choose> |
|
99 |
<xsl:when |
|
100 |
test="./*[local-name()='identifier' and ./@type='doi']"> |
|
101 |
<xsl:value-of |
|
102 |
select="concat($namespacePrefix, '::', dnet:generateIdentifier(./*[local-name()='identifier' and ./@type='doi'],'doi'))"/> |
|
103 |
</xsl:when> |
|
104 |
<xsl:otherwise> |
|
105 |
<xsl:value-of |
|
106 |
select="concat($namespacePrefix, '::', dnet:generateIdentifier(./*[local-name()='identifier'][1], ./*[local-name()='identifier'][1]/@type))"/> |
|
107 |
</xsl:otherwise> |
|
108 |
</xsl:choose> |
|
109 |
</xsl:when> |
|
110 |
<xsl:otherwise> |
|
111 |
<xsl:value-of select="./*[local-name()='identifier']"/> |
|
112 |
</xsl:otherwise> |
|
113 |
</xsl:choose> |
|
114 |
</xsl:variable> |
|
115 |
|
|
116 |
|
|
117 |
<xsl:for-each select=".//*[local-name()='identifier']"> |
|
118 |
<relatedIdentifier xmlns:oaf="http://namespace.dnet.eu/oaf" |
|
119 |
inverseRelationType="unknown" relationType="unknown" |
|
120 |
entityType="{$relTypology}"> |
|
121 |
<xsl:attribute name="relatedIdentifierType"> |
|
122 |
<xsl:value-of select="$relatedIdType"/> |
|
123 |
</xsl:attribute> |
|
124 |
<xsl:value-of select="$relatedId"/> |
|
125 |
</relatedIdentifier> |
|
126 |
</xsl:for-each> |
|
127 |
</xsl:if> |
|
128 |
</xsl:for-each> |
|
97 |
<relatedIdentifier xmlns:oaf="http://namespace.dnet.eu/oaf" |
|
98 |
inverseRelationType="{$inverseRelation}" relationType="{$relation}" |
|
99 |
entityType="{$targetType}" name="dnet"> |
|
100 |
<xsl:value-of select="$dnetTargetId"/> |
|
101 |
</relatedIdentifier> |
|
129 | 102 |
</relatedIdentifiers> |
130 | 103 |
</resource> |
131 | 104 |
</metadata> |
... | ... | |
144 | 117 |
</oaf:datainfo> |
145 | 118 |
</oaf:about> |
146 | 119 |
</oai:record> |
147 |
|
|
148 |
|
|
149 |
|
|
150 |
|
|
151 |
|
|
152 |
|
|
153 |
|
|
154 |
<xsl:for-each select="//*[local-name()='relatedInfo' and ./@type='publication']"> |
|
155 |
|
|
156 |
<xsl:if test="count(./*[local-name()='identifier']) > 0"> |
|
157 |
<xsl:variable name="pidType"> |
|
158 |
<xsl:choose> |
|
159 |
<xsl:when test="count(./*[local-name()='identifier' and ./@type='doi'])">doi</xsl:when> |
|
160 |
<xsl:otherwise> |
|
161 |
<xsl:value-of select="./*[local-name()='identifier'][1]/@type"/> |
|
162 |
</xsl:otherwise> |
|
163 |
</xsl:choose> |
|
164 |
</xsl:variable> |
|
165 |
<xsl:variable name="publicationIdentifier"> |
|
166 |
<xsl:choose> |
|
167 |
<xsl:when test="count(./*[local-name()='identifier' and ./@type='doi'])"> |
|
168 |
<xsl:value-of select="./*[local-name()='identifier' and ./@type='doi']"/> |
|
169 |
</xsl:when> |
|
170 |
<xsl:otherwise> |
|
171 |
<xsl:value-of select="./*[local-name()='identifier'][1]"/> |
|
172 |
</xsl:otherwise> |
|
173 |
</xsl:choose> |
|
174 |
</xsl:variable> |
|
175 |
<xsl:variable name="objIdentifier"> |
|
176 |
<xsl:value-of |
|
177 |
select="concat($namespacePrefix, '::', dnet:generateIdentifier($publicationIdentifier,$pidType))"/> |
|
178 |
</xsl:variable> |
|
179 |
<oai:record xmlns:oai="http://www.openarchives.org/OAI/2.0/" |
|
180 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
181 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|
182 |
<oai:header> |
|
183 |
<dri:objIdentifier> |
|
184 |
<xsl:value-of select="$objIdentifier"/> |
|
185 |
</dri:objIdentifier> |
|
186 |
<dri:recordIdentifier> |
|
187 |
<xsl:value-of select="$publicationIdentifier"/> |
|
188 |
</dri:recordIdentifier> |
|
189 |
<dri:dateOfCollection> |
|
190 |
<xsl:value-of select="//dri:dateOfCollection"/> |
|
191 |
</dri:dateOfCollection> |
|
192 |
<dri:repositoryId> |
|
193 |
<xsl:value-of select="//dri:repositoryId"/> |
|
194 |
</dri:repositoryId> |
|
195 |
<dri:datasourceprefix> |
|
196 |
<xsl:value-of select="$namespacePrefix"/> |
|
197 |
</dri:datasourceprefix> |
|
198 |
<oai:identifier> |
|
199 |
<xsl:value-of select="$publicationIdentifier"/> |
|
200 |
</oai:identifier> |
|
201 |
</oai:header> |
|
202 |
<metadata> |
|
203 |
<oaf:pid type="{$pidType}"> |
|
204 |
<xsl:value-of select="$publicationIdentifier"/> |
|
205 |
</oaf:pid> |
|
206 |
<dc:identifier> |
|
207 |
<xsl:value-of select="$publicationIdentifier"/> |
|
208 |
</dc:identifier> |
|
209 |
<xsl:for-each select="./*[local-name()='title']"> |
|
210 |
<dc:title> |
|
120 |
</xsl:when> |
|
121 |
<xsl:when test=".//*[local-name()='source']/*[local-name()='objectType']/*[local-name()='type'] = 'literature' or .//*[local-name()='source']/*[local-name()='objectType']/*[local-name()='type'] = 'publication'"> |
|
122 |
<oai:record xmlns="http://namespace.openaire.eu/" |
|
123 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|
124 |
<oai:header> |
|
125 |
<dri:objIdentifier><xsl:value-of select="$dnetSourceId"/></dri:objIdentifier> |
|
126 |
<dri:recordIdentifier><xsl:value-of select="concat($pid, '::', $pidType)"/></dri:recordIdentifier> |
|
127 |
<dri:dateOfCollection><xsl:value-of select="//dri:dateOfCollection"/> </dri:dateOfCollection> |
|
128 |
<dri:repositoryId><xsl:value-of select="//dri:repositoryId"/></dri:repositoryId> |
|
129 |
<dri:datasourceprefix><xsl:value-of select="$namespacePrefix"/></dri:datasourceprefix> |
|
130 |
</oai:header> |
|
131 |
<metadata> |
|
132 |
<oaf:pid type="{$pidType}"><xsl:value-of select="$pid"/></oaf:pid> |
|
133 |
<dc:identifier><xsl:value-of select="$pid"/> </dc:identifier> |
|
134 |
<dc:title><xsl:value-of select="//*[local-name()='source']/*[local-name()='title']"/></dc:title> |
|
135 |
<xsl:for-each select="//*[local-name()='source']//*[local-name()='creatorName']"> |
|
136 |
<dc:creator><xsl:value-of select="."/></dc:creator> |
|
137 |
</xsl:for-each> |
|
138 |
<dc:type >publication</dc:type> |
|
139 |
<oaf:relatedIdentifier inverseRelationType="{$inverseRelation}" relationType="{$relation}" |
|
140 |
entityType="{$targetType}" name="dnet"> |
|
141 |
<xsl:value-of select="$dnetTargetId"/> |
|
142 |
</oaf:relatedIdentifier> |
|
143 |
</metadata> |
|
144 |
<oaf:about> |
|
145 |
<oaf:datainfo> |
|
146 |
<oaf:collectedFrom completionStatus="complete"> |
|
147 |
<xsl:attribute name="id"> |
|
148 |
<xsl:value-of select="dnet:getIdFromDataSourcePrefix($namespacePrefix)"/> |
|
149 |
</xsl:attribute> |
|
150 |
<xsl:attribute name="name"> |
|
151 |
<xsl:value-of select="dnet:getNameFromDataSourcePrefix($namespacePrefix)"/> |
|
152 |
</xsl:attribute> |
|
153 |
</oaf:collectedFrom> |
|
154 |
<oaf:completionStatus>complete</oaf:completionStatus> |
|
155 |
<oaf:provisionMode>collected</oaf:provisionMode> |
|
156 |
</oaf:datainfo> |
|
157 |
</oaf:about> |
|
158 |
</oai:record> |
|
159 |
</xsl:when> |
|
160 |
</xsl:choose> |
|
161 |
<xsl:choose> |
|
162 |
<xsl:when test="//*[local-name()='target']/*[local-name()='objectType']/*[local-name()='type'] = 'literature' or //*[local-name()='target']/*[local-name()='objectType']/*[local-name()='type'] = 'publication'"> |
|
163 |
<oai:record xmlns="http://namespace.openaire.eu/" |
|
164 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|
165 |
<oai:header> |
|
166 |
<dri:objIdentifier><xsl:value-of select="$dnetTargetId"/></dri:objIdentifier> |
|
167 |
<dri:recordIdentifier><xsl:value-of select="concat($relatedPid, '::', $relatedPidType)"/></dri:recordIdentifier> |
|
168 |
<dri:dateOfCollection><xsl:value-of select="//dri:dateOfCollection"/> </dri:dateOfCollection> |
|
169 |
<dri:repositoryId><xsl:value-of select="//dri:repositoryId"/></dri:repositoryId> |
|
170 |
<dri:datasourceprefix><xsl:value-of select="$namespacePrefix"/></dri:datasourceprefix> |
|
171 |
</oai:header> |
|
172 |
<metadata> |
|
173 |
<oaf:pid type="{$relatedPidType}"><xsl:value-of select="$relatedPid"/></oaf:pid> |
|
174 |
<dc:identifier><xsl:value-of select="$relatedPid"/> </dc:identifier> |
|
175 |
<dc:title><xsl:value-of select="//*[local-name()='target']/*[local-name()='title']"/></dc:title> |
|
176 |
<xsl:for-each select="//*[local-name()='target']//*[local-name()='creatorName']"> |
|
177 |
<dc:creator><xsl:value-of select="."/></dc:creator> |
|
178 |
</xsl:for-each> |
|
179 |
<dc:type >publication</dc:type> |
|
180 |
<oaf:relatedIdentifier inverseRelationType="{$relation}" relationType="{$inverseRelation}" |
|
181 |
entityType="{$sourceType}" name="dnet"> |
|
182 |
<xsl:value-of select="$dnetSourceId"/> |
|
183 |
</oaf:relatedIdentifier> |
|
184 |
</metadata> |
|
185 |
<oaf:about> |
|
186 |
<oaf:datainfo> |
|
187 |
<oaf:collectedFrom completionStatus="complete"> |
|
188 |
<xsl:attribute name="id"> |
|
189 |
<xsl:value-of select="dnet:getIdFromDataSourcePrefix($namespacePrefix)"/> |
|
190 |
</xsl:attribute> |
|
191 |
<xsl:attribute name="name"> |
|
192 |
<xsl:value-of select="dnet:getNameFromDataSourcePrefix($namespacePrefix)"/> |
|
193 |
</xsl:attribute> |
|
194 |
</oaf:collectedFrom> |
|
195 |
<oaf:completionStatus>complete</oaf:completionStatus> |
|
196 |
<oaf:provisionMode>collected</oaf:provisionMode> |
|
197 |
</oaf:datainfo> |
|
198 |
</oaf:about> |
|
199 |
</oai:record> |
|
200 |
</xsl:when> |
|
201 |
<xsl:when test=".//*[local-name()='target']/*[local-name()='objectType']/*[local-name()='type'] = 'dataset' or .//*[local-name()='target']/*[local-name()='objectType']/*[local-name()='type'] = 'collection'"> |
|
202 |
<oai:record xmlns="http://namespace.openaire.eu/" |
|
203 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|
204 |
<oai:header> |
|
205 |
<dri:objIdentifier><xsl:value-of select="$dnetTargetId"/></dri:objIdentifier> |
|
206 |
<dri:recordIdentifier><xsl:value-of select="concat($relatedPid, '::', $relatedPidType)"/></dri:recordIdentifier> |
|
207 |
<dri:dateOfCollection><xsl:value-of select="//dri:dateOfCollection"/> </dri:dateOfCollection> |
|
208 |
<dri:repositoryId><xsl:value-of select="//dri:repositoryId"/></dri:repositoryId> |
|
209 |
<dri:datasourceprefix><xsl:value-of select="$namespacePrefix"/></dri:datasourceprefix> |
|
210 |
</oai:header> |
|
211 |
<metadata> |
|
212 |
<resource xmlns="http://datacite.org/schema/kernel-3" |
|
213 |
xsi:schemaLocation="http://datacite.org/schema/kernel-3 http://schema.datacite.org/meta/kernel-3/metadata.xsd"> |
|
214 |
<identifier identifierType="{$relatedPidType}" > |
|
215 |
<xsl:value-of select="$relatedPid"/> |
|
216 |
</identifier> |
|
217 |
<titles> |
|
218 |
<xsl:for-each |
|
219 |
select="//*[local-name()='target']/*[local-name()='title']"> |
|
220 |
<title> |
|
211 | 221 |
<xsl:value-of select="."/> |
212 |
</dc:title>
|
|
222 |
</title> |
|
213 | 223 |
</xsl:for-each> |
214 |
<xsl:for-each select=".//*[local-name()='note']"> |
|
215 |
<dc:description> |
|
224 |
</titles> |
|
225 |
<publisher > |
|
226 |
<xsl:value-of select="//*[local-name()='publisher']/*[local-name()='name']"/></publisher> |
|
227 |
<dates> |
|
228 |
<xsl:for-each select="//*[local-name()='target']/*[local-name()='publicationDate']"> |
|
229 |
<date dateType="Collected"> |
|
216 | 230 |
<xsl:value-of select="."/> |
217 |
</dc:description>
|
|
231 |
</date>
|
|
218 | 232 |
</xsl:for-each> |
219 |
<dc:type>publication</dc:type> |
|
220 |
</metadata> |
|
221 |
<oaf:about> |
|
222 |
<oaf:datainfo> |
|
223 |
<oaf:collectedFrom completionStatus="complete"> |
|
224 |
<xsl:attribute name="id"> |
|
225 |
<xsl:value-of select="dnet:getIdFromDataSourcePrefix($namespacePrefix)"/> |
|
226 |
</xsl:attribute> |
|
227 |
<xsl:attribute name="name"> |
|
228 |
<xsl:value-of select="dnet:getNameFromDataSourcePrefix($namespacePrefix)"/> |
|
229 |
</xsl:attribute> |
|
230 |
</oaf:collectedFrom> |
|
231 |
<oaf:completionStatus>complete</oaf:completionStatus> |
|
232 |
<oaf:provisionMode>collected</oaf:provisionMode> |
|
233 |
</oaf:datainfo> |
|
234 |
</oaf:about> |
|
235 |
</oai:record> |
|
236 |
</xsl:if> |
|
237 |
</xsl:for-each> |
|
238 |
</pack> |
|
239 |
</xsl:otherwise> |
|
240 |
</xsl:choose> |
|
233 |
</dates> |
|
234 |
<creators> |
|
235 |
<xsl:for-each select="//*[local-name()='target']//*[local-name()='creatorName']"> |
|
236 |
<creator> |
|
237 |
<creatorName><xsl:value-of select="."/></creatorName> |
|
238 |
</creator> |
|
239 |
</xsl:for-each> |
|
240 |
</creators> |
|
241 |
<resourceType resourceTypeGeneral="Dataset">Dataset</resourceType> |
|
242 |
<relatedIdentifiers> |
|
243 |
<relatedIdentifier xmlns:oaf="http://namespace.dnet.eu/oaf" |
|
244 |
inverseRelationType="{$relation}" relationType="{$inverseRelation}" |
|
245 |
entityType="{$sourceType}" name="dnet"> |
|
246 |
<xsl:value-of select="$dnetSourceId"/> |
|
247 |
</relatedIdentifier> |
|
248 |
</relatedIdentifiers> |
|
249 |
</resource> |
|
250 |
</metadata> |
|
251 |
<oaf:about> |
|
252 |
<oaf:datainfo> |
|
253 |
<oaf:collectedFrom completionStatus="complete"> |
|
254 |
<xsl:attribute name="id"> |
|
255 |
<xsl:value-of select="dnet:getIdFromDataSourcePrefix($namespacePrefix)"/> |
|
256 |
</xsl:attribute> |
|
257 |
<xsl:attribute name="name"> |
|
258 |
<xsl:value-of select="dnet:getNameFromDataSourcePrefix($namespacePrefix)"/> |
|
259 |
</xsl:attribute> |
|
260 |
</oaf:collectedFrom> |
|
261 |
<oaf:completionStatus>complete</oaf:completionStatus> |
|
262 |
<oaf:provisionMode>collected</oaf:provisionMode> |
|
263 |
</oaf:datainfo> |
|
264 |
</oaf:about> |
|
265 |
</oai:record> |
|
266 |
</xsl:when> |
|
267 |
</xsl:choose> |
|
268 |
</pack> |
|
241 | 269 |
</xsl:template> |
242 | 270 |
</xsl:stylesheet>]]> |
243 | 271 |
</CODE> |
Also available in: Unified diff
update wf