1 |
31284
|
sandro.lab
|
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
42137
|
alessia.ba
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
3 |
|
|
version="1.0">
|
4 |
31284
|
sandro.lab
|
|
5 |
40581
|
sandro.lab
|
<xsl:param name="parentDatasourceId"/>
|
6 |
|
|
<xsl:param name="namespacePrefix"/>
|
7 |
31284
|
sandro.lab
|
|
8 |
40581
|
sandro.lab
|
<xsl:template match="/">
|
9 |
43058
|
sandro.lab
|
<xsl:variable name="oName" select="normalize-space(//column[./@name='1'])"/>
|
10 |
|
|
|
11 |
|
|
<xsl:choose>
|
12 |
|
|
<xsl:when test="string-length($oName) > 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 |
51516
|
claudio.at
|
<ROW table="dsm_datasources">
|
22 |
43058
|
sandro.lab
|
<FIELD name="id">
|
23 |
|
|
<xsl:value-of select="$datasourceId"/>
|
24 |
|
|
</FIELD>
|
25 |
51865
|
alessia.ba
|
<FIELD name="_dnet_resource_identifier_">
|
26 |
|
|
<xsl:value-of select="$datasourceId"/>
|
27 |
|
|
</FIELD>
|
28 |
43058
|
sandro.lab
|
<FIELD name="officialname">
|
29 |
|
|
<xsl:value-of select="$oName"/>
|
30 |
|
|
</FIELD>
|
31 |
|
|
<FIELD name="englishname">
|
32 |
|
|
<xsl:value-of select="$oName"/>
|
33 |
|
|
</FIELD>
|
34 |
|
|
<FIELD name="od_contenttypes">
|
35 |
|
|
<xsl:value-of select="string('Journal articles')"/>
|
36 |
|
|
</FIELD>
|
37 |
|
|
<FIELD name="websiteurl">
|
38 |
|
|
<xsl:value-of select="normalize-space(//column[./@name='2'])"/>
|
39 |
|
|
</FIELD>
|
40 |
|
|
<FIELD name="namespaceprefix">
|
41 |
|
|
<xsl:value-of select="concat('irdb___',$namespacePrefix)"/>
|
42 |
|
|
</FIELD>
|
43 |
51516
|
claudio.at
|
<FIELD name="typology">pubsrepository::journal</FIELD>
|
44 |
43058
|
sandro.lab
|
<FIELD name="collectedfrom">
|
45 |
|
|
<xsl:value-of select="$parentDatasourceId"/>
|
46 |
|
|
</FIELD>
|
47 |
51516
|
claudio.at
|
<FIELD name="provenanceaction">sysimport:crosswalk:entityregistry</FIELD>
|
48 |
43058
|
sandro.lab
|
</ROW>
|
49 |
|
|
</ROWS>
|
50 |
|
|
</metadata>
|
51 |
|
|
</record>
|
52 |
|
|
</xsl:when>
|
53 |
|
|
<xsl:otherwise>
|
54 |
|
|
<JUNK/>
|
55 |
|
|
</xsl:otherwise>
|
56 |
|
|
</xsl:choose>
|
57 |
40581
|
sandro.lab
|
</xsl:template>
|
58 |
31284
|
sandro.lab
|
</xsl:stylesheet>
|