Commit 408b0473 authored by Steinberg, Jan's avatar Steinberg, Jan
Browse files

added region - journal of ERSA

parent 08239d2f
......@@ -262,6 +262,13 @@ public class ContentResolver {
}
}
// workaround for openjournals.wu-wien.ac.at/ojs redundant http and https urls
Set<String> maybeUniWienHttpsUrls = contentsUrlStrings.stream().filter(str -> str.startsWith("https://openjournals.wu-wien.ac.at/ojs")).collect(Collectors.toSet());
if (maybeUniWienHttpsUrls.size() >= 1) {
contentsUrlStrings = maybeUniWienHttpsUrls;
}
return contentsUrlStrings;
}
......
......@@ -69,7 +69,7 @@ jhipster:
# ===================================================================
ingester:
endpoint: http://ssoar.svko-dda-test.gesis.intra/rest
endpoint: https://ssoar.svko-dda-test.gesis.intra/rest
email: dummy-editor@example.com
password: dummy-editor
targetCollection: 11
......@@ -6,6 +6,7 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import java.time.Instant;
......@@ -817,15 +818,26 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher.country", "MISC") ) );
}
// UPDATE 2018-05-04 REGION currently does not provide nlm metadata prefix
@Test
public void getSinglePublicationRegion() throws IOException {
Map<String, String> map = new HashMap<>();
String xMetaDissPlusXsltString = IOUtils.toString(
/*
// UPDATE 2018-05-04 REGION currently does not provide nlm metadata prefix
String nlmXsltString = IOUtils.toString(
getClass().
getClassLoader().
getResourceAsStream("xslt/region-nlm-2-xmlbundle.xslt"), StandardCharsets.UTF_8);
map.put("nlm", xMetaDissPlusXsltString);
map.put("nlm", nlmXsltString);
*/
String oaiMarcXsltString = IOUtils.toString(
getClass().
getClassLoader().
getResourceAsStream("xslt/region-oai_marc-2-xmlbundle.xslt"), StandardCharsets.UTF_8);
map.put("oai_marc", oaiMarcXsltString);
String oaiDcXsltString = IOUtils.toString(
getClass().
......@@ -833,7 +845,7 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
getResourceAsStream("xslt/region-oai_dc-2-xmlbundle.xslt"), StandardCharsets.UTF_8);
map.put("oai_dc", oaiDcXsltString);
XsltTransformerOaiPmhBundlesStreamSource bss = new XsltTransformerOaiPmhBundlesStreamSource("http://openjournals.wu.ac.at/ojs/index.php/region/oai/", map);
XsltTransformerOaiPmhBundlesStreamSource bss = new XsltTransformerOaiPmhBundlesStreamSource("https://openjournals.wu-wien.ac.at/ojs/index.php/region/oai/", map);
Bundle bundle = bss.getBundle("oai:ojs.openjournals.wu.ac.at:article/121");
......@@ -855,7 +867,7 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.description.abstract", "en", "We study the association between fiscal policy and subjective wellbeing using fiscal data on 34 countries across 129 country-years, combined with over 170,000 people’s subjective wellbeing scores. While past research has found that ‘distortionary taxes’ (e.g. income taxes) are associated with slow growth relative to ‘non-distortionary’ taxes (GST/VAT), we find that distortionary taxes are associated with higher levels of subjective wellbeing than non-distortionary taxes. This relationship holds when we control for macro-economic variables and country fixed effects. If this relationship is causal, it would offer an explanation as to why governments pursue these policies that harm economic growth. We find that richer people’s subjective wellbeing is less harmed by indirect taxes than people with lower incomes, while “unproductive expenditure” is associated with higher wellbeing for the middle class relative to others, possibly reflecting middle class capture. We see little evidence for differential effects of fiscal policy on people living in different sized settlements. Devolving a portion of expenditure to subnational government is associated with higher subjective wellbeing but devolving tax collection to subnational government is associated with monotonically lower subjective wellbeing.") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.description.abstract") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("dc.identifier.issn", "2409-5370") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.identifier.url", "http://openjournals.wu.ac.at/ojs/index.php/region/article/view/121") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.identifier.url", "https://openjournals.wu-wien.ac.at/ojs/index.php/region/article/view/121") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.identifier.url") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("dc.language", "en") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.rights.licence", "32") ) );
......@@ -864,16 +876,29 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.source.pageinfo", "43-69") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.source.pageinfo") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("dc.source.volume", "3") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "en", "Subjective wellbeing") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "en", "Fiscal policy") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "en", "Decentralised government") ) );
// assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "en", "Subjective wellbeing") ) );
// assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "en", "Fiscal policy") ) );
// assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "en", "Decentralised government") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.title", "en", "Subjective Wellbeing Impacts of National and Subnational Fiscal Policies") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.title") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("dc.identifier.doi", "https://doi.org/10.18335/region.v3i1.121") ) );
assertTrue( metadata.contains( new SimpleMetadatum("internal.dda.reference", "http://openjournals.wu.ac.at/ojs/index.php/region/oai/@@oai:ojs.openjournals.wu.ac.at:article/121") ) );
assertTrue( metadata.contains( new SimpleMetadatum("internal.dda.reference", "https://openjournals.wu-wien.ac.at/ojs/index.php/region/oai/@@oai:ojs.openjournals.wu.ac.at:article/121") ) );
// assertFalse( metadata.contains( new SimpleMetadatum("internal.dda.reference", "https://openjournals.wu-wien.ac.at/ojs/index.php/region/oai@@oai:ojs.openjournals.wu.ac.at:article/121") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher.country", "AUT") ) );
Set<InputStream> fileSet = bundle.getContents();
assertEquals( 1, fileSet.size());
LOG.info("---------------------------------------");
bundle = bss.getBundle("oai:ojs.openjournals.wu.ac.at:article/111");
metadata = bundle.getMetadata();
assertTrue( metadata.contains( new SimpleMetadatum("internal.dda.reference", "https://openjournals.wu-wien.ac.at/ojs/index.php/region/oai/@@oai:ojs.openjournals.wu.ac.at:article/111") ) );
// assertFalse( metadata.contains( new SimpleMetadatum("internal.dda.reference", "https://openjournals.wu-wien.ac.at/ojs/index.php/region/oai@@oai:ojs.openjournals.wu.ac.at:article/111") ) );
fileSet = bundle.getContents();
assertEquals( 1, fileSet.size());
LOG.info("---------------------------------------");
bundle = bss.getBundle("oai:ojs.openjournals.wu.ac.at:article/188");
LOG.info("{}", bundle);
metadata = bundle.getMetadata();
......@@ -881,7 +906,21 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.title", "en", "Well-being in cities and regions: measurement, analysis and policy practices") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.description.review", "2") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.description.review") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("dc.source.issuetopic", "Special Issue: Well-being in cities and regions: measurement, analysis and policy practices") ) );
// assertTrue( metadata.contains( new SimpleMetadatum("dc.source.issuetopic", "Special Issue: Well-being in cities and regions: measurement, analysis and policy practices") ) );
fileSet = bundle.getContents();
assertEquals( 1, fileSet.size());
LOG.info("---------------------------------------");
bundle = bss.getBundle("oai:ojs.openjournals.wu.ac.at:article/18");
fileSet = bundle.getContents();
assertEquals( 1, fileSet.size());
LOG.info("---------------------------------------");
bundle = bss.getBundle("oai:ojs.openjournals.wu.ac.at:article/176");
fileSet = bundle.getContents();
assertEquals( 1, fileSet.size());
}
......
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="3.0"
xmlns:cc="http://www.d-nb.de/standards/cc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcmitype="http://purl.org/dc/dcmitype/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:ddb="http://www.d-nb.de/standards/ddb/"
xmlns:dini="http://www.d-nb.de/standards/xmetadissplus/type/"
xmlns:doi="http://www.d-nb.de/standards/doi/"
xmlns:hdl="http://www.d-nb.de/standards/hdl/"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:nlm="http://dtd.nlm.nih.gov/publishing/2.3"
xmlns:oai="http://www.openarchives.org/OAI/2.0/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:pc="http://www.d-nb.de/standards/pc/"
xmlns:thesis="http://www.ndltd.org/standards/metadata/etdms/1.0/"
xmlns:urn="http://www.d-nb.de/standards/urn/"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xMetaDiss="http://www.d-nb.de/standards/xmetadissplus/"
xmlns:xoai="http://www.lyncode.com/xoai"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:zoai="http://git.gesis.org/dda/zoai">
<xsl:output indent="yes"/>
<xsl:strip-space elements="*"/>
<!-- <xsl:copy-of select="."/> -->
<!-- <xsl:message terminate="no">here is some message for stderr, e.g. <xsl:value-of select='text()' /> </xsl:message> -->
<!-- override default template -->
<xsl:template match="*" />
<xsl:template match="/">
<xsl:element name="bundle">
<xsl:element name="metadata">
<xsl:apply-templates select="oai:OAI-PMH/oai:GetRecord/oai:record/oai:metadata/oai_dc:dc" />
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template match="oai:OAI-PMH/oai:GetRecord/oai:record/oai:metadata/oai_dc:dc">
<xsl:apply-templates></xsl:apply-templates>
</xsl:template>
<xsl:template match="dc:language">
<xsl:variable name="sanitizedLanguage" select="zoai:sanitizeLanguage( text() )" />
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.language'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="$sanitizedLanguage"/>
</xsl:call-template>
</xsl:template>
<xsl:template match="dc:source[@xml:lang='en-US']">
<xsl:variable name="pageinfo" select="tokenize( text(),'; ' )[last()]" />
<xsl:if test="$pageinfo != '' and matches($pageinfo, '^\d+(-\d+)?')">
<xsl:stylesheet version="2.0"
xmlns:cc="http://www.d-nb.de/standards/cc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcmitype="http://purl.org/dc/dcmitype/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:ddb="http://www.d-nb.de/standards/ddb/"
xmlns:dini="http://www.d-nb.de/standards/xmetadissplus/type/"
xmlns:doi="http://www.d-nb.de/standards/doi/"
xmlns:hdl="http://www.d-nb.de/standards/hdl/"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:nlm="http://dtd.nlm.nih.gov/publishing/2.3"
xmlns:oai="http://www.openarchives.org/OAI/2.0/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:pc="http://www.d-nb.de/standards/pc/"
xmlns:thesis="http://www.ndltd.org/standards/metadata/etdms/1.0/"
xmlns:urn="http://www.d-nb.de/standards/urn/"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xMetaDiss="http://www.d-nb.de/standards/xmetadissplus/"
xmlns:xoai="http://www.lyncode.com/xoai"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:zoai="http://git.gesis.org/dda/zoai">
<xsl:output indent="yes"/>
<xsl:strip-space elements="*"/>
<!-- <xsl:copy-of select="."/> -->
<!-- <xsl:message terminate="no">here is some message for stderr, e.g. <xsl:value-of select='text()' /> </xsl:message> -->
<!-- override default template -->
<xsl:template match="*" />
<xsl:template match="/">
<xsl:element name="bundle">
<xsl:element name="metadata">
<xsl:choose>
<xsl:when test="matches(oai:OAI-PMH/oai:GetRecord/oai:record/oai:header/oai:setSpec, 'region:ART')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.review'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="1"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.review'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="2"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="oai:OAI-PMH/oai:GetRecord/oai:record/oai:metadata/oai_dc:dc" />
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template match="oai:OAI-PMH/oai:GetRecord/oai:record/oai:metadata/oai_dc:dc">
<xsl:apply-templates select="dc:title" />
<xsl:apply-templates select="dc:language" />
<xsl:apply-templates select="dc:source[@xml:lang='en-US']" />
<xsl:apply-templates select="dc:identifier[matches(text(), '^10\..*region')]" />
<!--xsl:apply-templates select="dc:type[@xml:lang='en-US']" /-->
<xsl:apply-templates select="dc:rights[@xml:lang='en-US']" />
</xsl:template>
<xsl:template match="dc:language">
<xsl:variable name="sanitizedLanguage" select="zoai:sanitizeLanguage( text() )" />
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.pageinfo'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="$pageinfo"/>
<xsl:with-param name="key" select="'dc.language'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="$sanitizedLanguage"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="dc:title">
<xsl:variable name="sanitizedLanguage" select="zoai:sanitizeLanguage( @xml:lang )" />
<xsl:variable name="sanitizedMainLanguage" select="zoai:sanitizeLanguage( /oai:OAI-PMH/oai:GetRecord/oai:record/oai:metadata/oai_dc:dc/dc:language )" />
</xsl:template>
<xsl:choose>
<xsl:when test="$sanitizedLanguage = $sanitizedMainLanguage">
<xsl:template match="dc:identifier[matches(text(), '^10\..*region')]">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.title'"/>
<xsl:with-param name="language" select="$sanitizedLanguage"/>
<xsl:with-param name="value" select="text()"/>
<xsl:with-param name="key" select="'dc.identifier.doi'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="concat('https://doi.org/', text())"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
</xsl:template>
<xsl:template match="dc:source[@xml:lang='en-US']">
<xsl:variable name="pageinfo" select="tokenize( text(),'; ' )[last()]" />
<xsl:if test="$pageinfo != '' and matches($pageinfo, '^\d+(-\d+)?')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.pageinfo'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="$pageinfo"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="$pageinfo != '' and matches($pageinfo, '^\w\d+(-\w\d+)?')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.pageinfo'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="$pageinfo"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="dc:rights[@xml:lang='en-US']">
<xsl:if test="text() = 'http://creativecommons.org/licenses/by-nc/4.0'">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.rights.licence'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="32"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<!--xsl:template match="dc:type[@xml:lang='en-US']">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.title.alternative'"/>
<xsl:with-param name="language" select="$sanitizedLanguage"/>
<xsl:with-param name="value" select="text()"/>
<xsl:with-param name="key" select="'dc.subject.other'"/>
<xsl:with-param name="language" select="'en'"/>
<xsl:with-param name="value" select="text()"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="new-metadatum">
<xsl:param name="key" />
<xsl:param name="language" />
<xsl:param name="value" />
<xsl:element name="metadatum">
<xsl:element name="key">
<xsl:value-of select="$key" />
</xsl:element>
<xsl:if test="$language != ''">
<xsl:variable name="sanitizedLanguage" select="zoai:sanitizeLanguage($language)" />
<xsl:element name="language">
<xsl:value-of select="$sanitizedLanguage" />
</xsl:element>
</xsl:if>
<xsl:element name="value">
<xsl:value-of select="$value" />
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:function name="zoai:sanitizeLanguage">
<xsl:param name="inputLanguage" />
<xsl:choose>
<xsl:when test="$inputLanguage = 'ger' or $inputLanguage = 'DE' or $inputLanguage = 'de-DE' or $inputLanguage = 'deu'">
<xsl:value-of select="'de'" />
</xsl:when>
<xsl:when test="$inputLanguage = 'eng' or $inputLanguage = 'EN' or $inputLanguage = 'en-US' or $inputLanguage = 'en-GB'">
<xsl:value-of select="'en'" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$inputLanguage" />
</xsl:otherwise>
</xsl:choose>
</xsl:function>
</xsl:template-->
<xsl:template match="dc:title">
<xsl:variable name="sanitizedLanguage" select="zoai:sanitizeLanguage( @xml:lang )" />
<xsl:variable name="sanitizedMainLanguage" select="zoai:sanitizeLanguage( /oai:OAI-PMH/oai:GetRecord/oai:record/oai:metadata/oai_dc:dc/dc:language )" />
<xsl:choose>
<xsl:when test="$sanitizedLanguage = $sanitizedMainLanguage">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.title'"/>
<xsl:with-param name="language" select="$sanitizedLanguage"/>
<xsl:with-param name="value" select="text()"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.title.alternative'"/>
<xsl:with-param name="language" select="$sanitizedLanguage"/>
<xsl:with-param name="value" select="text()"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="new-metadatum">
<xsl:param name="key" />
<xsl:param name="language" />
<xsl:param name="value" />
<xsl:element name="metadatum">
<xsl:element name="key">
<xsl:value-of select="$key" />
</xsl:element>
<xsl:if test="$language != ''">
<xsl:variable name="sanitizedLanguage" select="zoai:sanitizeLanguage($language)" />
<xsl:element name="language">
<xsl:value-of select="$sanitizedLanguage" />
</xsl:element>
</xsl:if>
<xsl:element name="value">
<xsl:value-of select="$value" />
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:function name="zoai:sanitizeLanguage">
<xsl:param name="inputLanguage" />
<xsl:choose>
<xsl:when test="$inputLanguage = 'ger' or $inputLanguage = 'DE' or $inputLanguage = 'de-DE' or $inputLanguage = 'deu'">
<xsl:value-of select="'de'" />
</xsl:when>
<xsl:when test="$inputLanguage = 'eng' or $inputLanguage = 'EN' or $inputLanguage = 'en-US' or $inputLanguage = 'en-GB'">
<xsl:value-of select="'en'" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$inputLanguage" />
</xsl:otherwise>
</xsl:choose>
</xsl:function>
</xsl:stylesheet>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:cc="http://www.d-nb.de/standards/cc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcmitype="http://purl.org/dc/dcmitype/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:ddb="http://www.d-nb.de/standards/ddb/"
xmlns:dini="http://www.d-nb.de/standards/xmetadissplus/type/"
xmlns:doi="http://www.d-nb.de/standards/doi/"
xmlns:hdl="http://www.d-nb.de/standards/hdl/"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:nlm="http://dtd.nlm.nih.gov/publishing/2.3"
xmlns:oai="http://www.openarchives.org/OAI/2.0/"
xmlns:oai_marc="http://www.openarchives.org/OAI/1.1/oai_marc"
xmlns:pc="http://www.d-nb.de/standards/pc/"
xmlns:thesis="http://www.ndltd.org/standards/metadata/etdms/1.0/"
xmlns:urn="http://www.d-nb.de/standards/urn/"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xMetaDiss="http://www.d-nb.de/standards/xmetadissplus/"
xmlns:xoai="http://www.lyncode.com/xoai"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:zoai="http://git.gesis.org/dda/zoai"
>
<xsl:output indent="yes"/>
<xsl:strip-space elements="*"/>
<!-- <xsl:message terminate="no">here is the tree at the current node <xsl:copy-of select="."/> </xsl:message> -->
<!-- <xsl:message terminate="no">here is some message for stderr, e.g. <xsl:value-of select='text()' /> </xsl:message> -->
<!--
<xsl:for-each select="./*">
<xsl:message terminate="no">a child=<xsl:value-of select="name()"/></xsl:message>
</xsl:for-each>
-->
<!-- override default template -->
<xsl:template match="*" />
<xsl:template match="/">
<xsl:element name="bundle">
<xsl:element name="metadata">
<xsl:variable name="ddaReference" select="concat(oai:OAI-PMH/oai:request[@verb='GetRecord']/text(), '@@', oai:OAI-PMH/oai:request[@verb='GetRecord']/@identifier)" />
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'internal.dda.reference'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="$ddaReference"/>
</xsl:call-template>
<xsl:apply-templates select="oai:OAI-PMH/oai:GetRecord/oai:record/oai:metadata/oai_marc:oai_marc" />
<xsl:apply-templates select="oai:OAI-PMH/oai:GetRecord/oai:record/oai:header" />
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.type.stock'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'article'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.type.document'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'32'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.journal'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'Region: the journal of ERSA'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.pubstatus'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'1'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher.country'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'AUT'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'ssoar.urn.registration'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'false'"/>
</xsl:call-template>
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template match="oai:OAI-PMH/oai:GetRecord/oai:record/oai:metadata/oai_marc:oai_marc">
<xsl:apply-templates select="oai_marc:varfield[@id='022']/child::node()[@label='$a']"/>
<xsl:apply-templates select="oai_marc:varfield[@id='100']/child::node()[@label='a']"/>
<!--xsl:apply-templates select="oai_marc:varfield[@id='245']/child::node()[@label='a']"/-->
<xsl:apply-templates select="oai_marc:varfield[@id='520']/child::node()[@label='a']"/>
<!--xsl:apply-templates select="oai_marc:varfield[@id='546']/child::node()[@label='a']"/-->
<xsl:apply-templates select="oai_marc:varfield[@id='720']/child::node()[@label='a']"/>
<xsl:apply-templates select="oai_marc:varfield[@id='786']/child::node()[@label='n']"/>
<xsl:apply-templates select="oai_marc:varfield[@id='856']/child::node()[@label='u']"/>
</xsl:template>
<xsl:template match="oai_marc:varfield[@id='022']/child::node()[@label='$a']">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.identifier.issn'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="text()"/>
</xsl:call-template>
</xsl:template>
<xsl:template match="oai_marc:varfield[@id='100']/child::node()[@label='a']">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.contributor.author'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="text()"/>
</xsl:call-template>
</xsl:template>
<!--xsl:template match="oai_marc:varfield[@id='245']/child::node()[@label='a']">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.title'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="text()"/>
</xsl:call-template>
</xsl:template-->
<xsl:template match="oai_marc:varfield[@id='520']/child::node()[@label='a']">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.abstract'"/>
<xsl:with-param name="language" select="'en'"/>
<xsl:with-param name="value" select="normalize-space(text())"/>
</xsl:call-template>
</xsl:template>
<!--xsl:template match="oai_marc:varfield[@id='546']/child::node()[@label='a']">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.language'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="normalize-space(text())"/>
</xsl:call-template>
</xsl:template-->
<xsl:template match="oai_marc:varfield[@id='720']/child::node()[@label='a']">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.contributor.author'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="text()"/>