Project

General

Profile

1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
                version="1.0">
4

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

    
8
	<xsl:template match="/">
9
		<xsl:variable name="oName" select="normalize-space(//column[./@name='1'])"/>
10

    
11
		<xsl:choose>
12
			<xsl:when test="string-length($oName) &gt; 0">
13
				<record>
14
					<xsl:copy-of select=".//*[local-name()='header']"/>
15
					<metadata>
16
						<xsl:variable name="rid" select="normalize-space(//column[./@name='journalid'])"/>
17
						<xsl:variable name="datasourceId" select="concat($namespacePrefix, '::', $rid)"/>
18
						<xsl:variable name="namespacePrefix" select='format-number($rid, "00000")'/>
19

    
20
						<ROWS>
21
							<ROW table="dsm_datasources">
22
								<FIELD name="id">
23
									<xsl:value-of select="$datasourceId"/>
24
								</FIELD>
25
								<FIELD name="officialname">
26
									<xsl:value-of select="$oName"/>
27
								</FIELD>
28
								<FIELD name="englishname">
29
									<xsl:value-of select="$oName"/>
30
								</FIELD>
31
								<FIELD name="od_contenttypes">
32
									<xsl:value-of select="string('Journal articles')"/>
33
								</FIELD>
34
								<FIELD name="websiteurl">
35
									<xsl:value-of select="normalize-space(//column[./@name='2'])"/>
36
								</FIELD>
37
								<FIELD name="namespaceprefix">
38
									<xsl:value-of select="concat('irdb___',$namespacePrefix)"/>
39
								</FIELD>
40
								<FIELD name="typology">pubsrepository::journal</FIELD>
41
								<FIELD name="collectedfrom">
42
									<xsl:value-of select="$parentDatasourceId"/>
43
								</FIELD>
44
								<FIELD name="provenanceaction">sysimport:crosswalk:entityregistry</FIELD>
45
							</ROW>
46
						</ROWS>
47
					</metadata>
48
				</record>
49
			</xsl:when>
50
			<xsl:otherwise>
51
				<JUNK/>
52
			</xsl:otherwise>
53
		</xsl:choose>
54
	</xsl:template>
55
</xsl:stylesheet>
(14-14/31)