Revision 53162
Added by Alessia Bardi about 5 years ago
journaltitles2db.xml | ||
---|---|---|
12 | 12 |
<SCRIPT> |
13 | 13 |
<TITLE>JOURNALTITLES 2 DB</TITLE> |
14 | 14 |
<CODE> |
15 |
<![CDATA[ |
|
15 |
|
|
16 | 16 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
17 | 17 |
xmlns:stringUtils="org.apache.commons.lang.StringUtils" |
18 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
18 | 19 |
version="1.0"> |
19 | 20 |
|
20 | 21 |
<xsl:param name="varDataSourceId"/> |
21 | 22 |
|
22 | 23 |
<xsl:template match="/"> |
23 |
<xsl:variable name="namespacePrefix" |
|
24 |
select="normalize-space(//oaf:datasourceprefix)" /> |
|
24 |
<xsl:choose> |
|
25 |
<xsl:when test="//column[./@name='ISSN'] != ''"> |
|
26 |
<xsl:call-template name="createJournal"> |
|
27 |
<xsl:with-param name="rid" select="normalize-space(//column[./@name='ISSN'])"/> |
|
28 |
</xsl:call-template> |
|
29 |
</xsl:when> |
|
30 |
<xsl:when test="//column[./@name='EISSN'] != ''"> |
|
31 |
<xsl:call-template name="createJournal"> |
|
32 |
<xsl:with-param name="rid" select="normalize-space(//column[./@name='EISSN'])"/> |
|
33 |
</xsl:call-template> |
|
34 |
</xsl:when> |
|
35 |
<xsl:otherwise> |
|
36 |
<record/> |
|
37 |
</xsl:otherwise> |
|
38 |
</xsl:choose> |
|
39 |
</xsl:template> |
|
40 |
|
|
41 |
|
|
42 |
<xsl:template name="createJournal"> |
|
43 |
<xsl:param name="rid"/> |
|
44 |
<xsl:variable name="namespacePrefix" select="normalize-space(.//dri:datasourceprefix)" /> |
|
25 | 45 |
<record> |
26 | 46 |
|
27 | 47 |
<xsl:copy-of select=".//*[local-name()='header']"/> |
28 | 48 |
<metadata> |
29 |
<xsl:variable name="rid" select="normalize-space(//column[./@name='ISSN'])"/> |
|
30 | 49 |
<xsl:variable name="datasourceId" select="concat($namespacePrefix, '::', $rid)"/> |
31 | 50 |
<xsl:variable name="ISSNNS" select="stringUtils:replace($rid,'-','')"/> |
32 | 51 |
|
... | ... | |
77 | 96 |
</xsl:template> |
78 | 97 |
|
79 | 98 |
</xsl:stylesheet> |
80 |
]]> |
|
81 | 99 |
</CODE> |
82 | 100 |
</SCRIPT> |
83 | 101 |
</CONFIGURATION> |
Also available in: Unified diff
Fine tuning transformation to use EISSN when ISSN is missing