Project

General

Profile

1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
                xmlns:clean="eu.dnetlib.msro.openaireplus.utils.CleaningXsltFunctions"
4
                version="1.0">
5

    
6
	<xsl:param name="parentDatasourceId"/>
7
	<xsl:param name="namespacePrefix"/>
8

    
9
	<xsl:template match="/">
10

    
11
		<record
12
		>
13

    
14
			<xsl:copy-of select=".//*[local-name()='header']"/>
15

    
16
			<metadata>
17
				<ROWS>
18
					<xsl:variable name="setSpec" select=".//*[local-name()='setSpec']"/>
19
					<xsl:variable name="setName" select=".//*[local-name()='setName']"/>
20

    
21
					<xsl:variable name="id" select="concat($namespacePrefix,'::', $setSpec)"/>
22

    
23
					<ROW table="datacite_temp_sets">
24
						<FIELD name="_dnet_resource_identifier_">
25
							<xsl:value-of select="$id"/>
26
						</FIELD>
27
						<FIELD name="id">
28
							<xsl:value-of select="$id"/>
29
						</FIELD>
30
						<FIELD name="setname">
31
							<xsl:value-of select="$setName"/>
32
						</FIELD>
33
						<FIELD name="setspec">
34
							<xsl:value-of select="$setSpec"/>
35
						</FIELD>
36
						<FIELD name="setname_cleaned">
37
							<xsl:value-of select="clean:clean($setName)"/>
38
						</FIELD>
39
						<FIELD name="oa_source_id">
40
							<xsl:value-of select="$parentDatasourceId"/>
41
						</FIELD>
42
					</ROW>
43
				</ROWS>
44
			</metadata>
45
		</record>
46

    
47
	</xsl:template>
48
</xsl:stylesheet>
(6-6/6)