1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
3
|
xmlns:stringUtils="org.apache.commons.lang.StringUtils"
|
4
|
version="1.0">
|
5
|
|
6
|
<xsl:param name="parentDatasourceId"/>
|
7
|
<xsl:param name="namespacePrefix"/>
|
8
|
|
9
|
<xsl:template match="/">
|
10
|
<xsl:choose>
|
11
|
<xsl:when test="//column[./@name='Journal ISSN (print version)'] != ''">
|
12
|
<xsl:call-template name="createJournal">
|
13
|
<xsl:with-param name="rid" select="normalize-space(//column[./@name='Journal ISSN (print version)'])"/>
|
14
|
</xsl:call-template>
|
15
|
</xsl:when>
|
16
|
<xsl:when test="//column[./@name='Journal EISSN (online version)'] != ''">
|
17
|
<xsl:call-template name="createJournal">
|
18
|
<xsl:with-param name="rid" select="normalize-space(//column[./@name='Journal EISSN (online version)'])"/>
|
19
|
</xsl:call-template>
|
20
|
</xsl:when>
|
21
|
<xsl:otherwise>
|
22
|
<record/>
|
23
|
</xsl:otherwise>
|
24
|
</xsl:choose>
|
25
|
</xsl:template>
|
26
|
|
27
|
<xsl:template name="createJournal">
|
28
|
<xsl:param name="rid"/>
|
29
|
|
30
|
<record>
|
31
|
<xsl:copy-of select=".//*[local-name()='header']"/>
|
32
|
<metadata>
|
33
|
<xsl:variable name="datasourceId" select="concat($namespacePrefix, '::', $rid)"/>
|
34
|
<xsl:variable name="ISSNNS" select="stringUtils:replace($rid,'-','')"/>
|
35
|
<ROWS>
|
36
|
<ROW table="dsm_datasources">
|
37
|
<FIELD name="id">
|
38
|
<xsl:value-of select="$datasourceId"/>
|
39
|
</FIELD>
|
40
|
<FIELD name="officialname">
|
41
|
<xsl:value-of select="normalize-space(//column[./@name='Journal title'])"/>
|
42
|
</FIELD>
|
43
|
<FIELD name="englishname">
|
44
|
<xsl:value-of select="normalize-space(//column[./@name='Journal title'])"/>
|
45
|
</FIELD>
|
46
|
<FIELD name="od_contenttypes">
|
47
|
<xsl:value-of select="string('Journal articles')"/>
|
48
|
</FIELD>
|
49
|
<FIELD name="issn">
|
50
|
<xsl:value-of select="normalize-space(//column[./@name='Journal ISSN (print version)'])"/>
|
51
|
</FIELD>
|
52
|
<FIELD name="eissn">
|
53
|
<xsl:value-of select="normalize-space(//column[./@name='Journal EISSN (online version)'])"/>
|
54
|
</FIELD>
|
55
|
<FIELD name="websiteurl">
|
56
|
<xsl:value-of select="normalize-space(//column[./@name='Journal URL'])"/>
|
57
|
</FIELD>
|
58
|
<FIELD name="namespaceprefix">
|
59
|
<xsl:value-of select="concat('doaj', $ISSNNS)"/>
|
60
|
</FIELD>
|
61
|
<FIELD name="typology">pubsrepository::journal</FIELD>
|
62
|
<FIELD name="collectedfrom">
|
63
|
<xsl:value-of select="$parentDatasourceId"/>
|
64
|
</FIELD>
|
65
|
<FIELD name="provenanceaction">sysimport:crosswalk:entityregistry</FIELD>
|
66
|
</ROW>
|
67
|
</ROWS>
|
68
|
</metadata>
|
69
|
</record>
|
70
|
</xsl:template>
|
71
|
|
72
|
|
73
|
</xsl:stylesheet>
|