Revision 48139
Added by Alessia Bardi almost 7 years ago
re3data_2_db.xsl | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" |
|
3 |
xmlns:dr="http://www.driver-repository.eu/namespace/dr" xmlns:dnet="eu.dnetlib.data.transform.xml.AbstractDNetXsltFunctions" |
|
4 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
5 |
xmlns:oaa="http://namespace.openaire.eu/oaa" xmlns:oaf="http://namespace.openaire.eu/oaf" |
|
6 |
xmlns:fn="http://www.w3.org/2005/xpath-functions" version="1.0"> |
|
2 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
3 |
xmlns:dnet="eu.dnetlib.data.transform.xml.AbstractDNetXsltFunctions" |
|
4 |
version="1.0"> |
|
7 | 5 |
|
8 | 6 |
<xsl:param name="parentDatasourceId"/> |
9 | 7 |
<xsl:param name="namespacePrefix"/> |
... | ... | |
11 | 9 |
<xsl:variable name="dsId" select="concat($namespacePrefix, '::', normalize-space(.//*[local-name()='re3data.orgIdentifier']))"/> |
12 | 10 |
|
13 | 11 |
<xsl:template match="/"> |
14 |
<record xmlns:dr="http://www.driver-repository.eu/namespace/dr" |
|
15 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
16 |
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
17 |
xmlns:oaf="http://namespace.openaire.eu/oaf" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"> |
|
12 |
<record |
|
13 |
> |
|
18 | 14 |
|
19 | 15 |
<xsl:copy-of select=".//*[local-name()='header']"/> |
20 | 16 |
<metadata> |
... | ... | |
139 | 135 |
<xsl:variable name="baseURL" select="normalize-space(.)"/> |
140 | 136 |
<FIELD name="original"> |
141 | 137 |
<xsl:choose> |
142 |
<xsl:when test="$baseURL != ''"><xsl:value-of select="$baseURL"/></xsl:when> |
|
143 |
<xsl:otherwise><xsl:value-of select="string('http://unavailable.base.url')"/></xsl:otherwise> |
|
138 |
<xsl:when test="$baseURL != ''"> |
|
139 |
<xsl:value-of select="$baseURL"/> |
|
140 |
</xsl:when> |
|
141 |
<xsl:otherwise> |
|
142 |
<xsl:value-of select="string('http://unavailable.base.url')"/> |
|
143 |
</xsl:otherwise> |
|
144 | 144 |
</xsl:choose> |
145 | 145 |
</FIELD> |
146 | 146 |
<FIELD name="api"> |
... | ... | |
228 | 228 |
<FIELD name="websiteurl"> |
229 | 229 |
<xsl:choose> |
230 | 230 |
<xsl:when test="starts-with(normalize-space(./*[local-name()='institutionURL']), 'http')"> |
231 |
<xsl:value-of select="./*[local-name()='institutionURL']" />
|
|
231 |
<xsl:value-of select="./*[local-name()='institutionURL']"/> |
|
232 | 232 |
</xsl:when> |
233 | 233 |
<xsl:when test="string-length(normalize-space(./*[local-name()='institutionURL'])) > 0"> |
234 |
<xsl:value-of select="concat('http://', normalize-space(./*[local-name()='institutionURL']))" />
|
|
234 |
<xsl:value-of select="concat('http://', normalize-space(./*[local-name()='institutionURL']))"/> |
|
235 | 235 |
</xsl:when> |
236 | 236 |
</xsl:choose> |
237 | 237 |
</FIELD> |
Also available in: Unified diff
integrated (hopefully) all required changes from dnet40