Commit d9ae8c62 authored by Steinberg, Jan's avatar Steinberg, Jan

econstor import optimizations, some additional logging etc.

parent 1cc5b101
......@@ -29,6 +29,7 @@ public class Wzb2SsoarBundleFilter implements BundleFilter {
int yearIssuedValue = Integer.parseInt(yearIssuedValueString);
if ( yearIssuedValue >= 2016 ) {
LOG.info("'{}' is newer than 2016", yearIssuedValueString);
result = true;
}
else {
......
......@@ -258,10 +258,10 @@ public class XsltTransformerOaiPmhBundlesStreamSource implements BundlesStreamSo
if (null != errorCode) {
if ("filteraway".equals(errorCode)) {
LOG.info("1- filtering away oaiPmhIdentifier={}", oaiPmhIdentifier);
LOG.info("ErrorCode={}", errorCode);
LOG.info("Error detail: {}", e.getCause().getLocalizedMessage());
resultBundle = null;
// test if this break is really necessary, taken out. STJ
// break;
break;
} else {
LOG.warn("2- fatalError. Filtering away oaiPmhIdentifier=" + oaiPmhIdentifier, e);
}
......
......@@ -63,7 +63,8 @@
<xsl:apply-templates select="oai:OAI-PMH/oai:GetRecord/oai:record/oai:metadata/oai_dc:dc" mode="ARLForMono"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="error(QName('','filteraway'), 'is not in relevant sets')" />
<!-- xsl:value-of select="error(QName('','filteraway'), 'is not in relevant sets')" / -->
<xsl:call-template name="filterAwayElement" />
</xsl:otherwise>
</xsl:choose>
......@@ -158,7 +159,7 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.abstract'"/>
<xsl:with-param name="language" select="$sanitizedLanguage"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="starts-with(text(), 'Zugl.: ') or starts-with(text(), 'Dissertationsschrift ')or starts-with(text(), 'PhD Thesis')">
......@@ -279,7 +280,7 @@
</xsl:template>
<xsl:template match="dc:identifier[matches(text(), '^Journal.*')]" mode="wzb">
<xsl:for-each select="tokenize(text(), ' ; ')">
<xsl:for-each select="tokenize(normalize-space(text()), ' ; ')">
<xsl:if test="starts-with(., 'Journal: ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.journal'"/>
......@@ -347,7 +348,7 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.issuetopic'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="replace($issuetopic,'',':')"/>
<xsl:with-param name="value" select="replace($issuetopic,'',':')"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
......@@ -467,28 +468,28 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.title'"/>
<xsl:with-param name="language" select="$sanitizedMainLanguage"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$sanitizedMainLanguage = '' and position() = 1">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.title'"/>
<xsl:with-param name="language" select="'de'"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="$sanitizedMainLanguage = '' and position() > 1">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.title.alternative'"/>
<xsl:with-param name="language" select="'de'"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</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="$sanitizedMainLanguage"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
......@@ -505,12 +506,6 @@
<xsl:with-param name="value" select="'1'"/>
</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="''"/>
......@@ -569,28 +564,28 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.abstract'"/>
<xsl:with-param name="language" select="'de'"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() = 1 and $sanitizedLanguage = 'en'">
<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(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() != 1 and $sanitizedLanguage = 'de'">
<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(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() != 1 and $sanitizedLanguage = 'en'">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.abstract'"/>
<xsl:with-param name="language" select="'de'"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
......@@ -705,7 +700,7 @@
</xsl:template>
<xsl:template match="dc:identifier[matches(text(), '^Journal.*')]" mode="rur">
<xsl:for-each select="tokenize(text(), ' ; ')">
<xsl:for-each select="tokenize(normalize-space(text()), ' ; ')">
<!-- xsl:if test="starts-with(., 'Journal: ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.journal'"/>
......@@ -773,7 +768,7 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.issuetopic'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="replace($issuetopic,'',':')"/>
<xsl:with-param name="value" select="replace($issuetopic,'',':')"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
......@@ -896,14 +891,14 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.title'"/>
<xsl:with-param name="language" select="$sanitizedMainLanguage"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</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="$theOtherLanguage"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
......@@ -917,12 +912,6 @@
<xsl:with-param name="value" select="'1'"/>
</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="''"/>
......@@ -992,28 +981,28 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.abstract'"/>
<xsl:with-param name="language" select="'de'"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() = 1 and $sanitizedLanguage = 'en'">
<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(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() != 1 and $sanitizedLanguage = 'de'">
<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(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() != 1 and $sanitizedLanguage = 'en'">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.abstract'"/>
<xsl:with-param name="language" select="'de'"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
......@@ -1074,50 +1063,50 @@
</xsl:call-template>
</xsl:for-each>
</xsl:if>
<xsl:for-each select="tokenize(text(), ' ; ')">
<xsl:if test="starts-with(., 'In: ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.collection'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="normalize-space(substring-after(.,'In:'))"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="starts-with(., 'ISBN: ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.identifier.isbn'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="normalize-space(substring-after(.,'ISBN:'))"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="starts-with(., 'No. ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.volume'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="normalize-space(substring-after(.,'No.'))"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="starts-with(., 'Issue: ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.issue'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="normalize-space(substring-after(.,'Issue:'))"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="starts-with(., 'Pages: ')">
<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="normalize-space(substring-after(.,'Pages:'))"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="starts-with(., 'Series: ')">
<xsl:for-each select="tokenize(normalize-space(text()), ' ; ')">
<xsl:if test="starts-with(normalize-space(.), 'In: ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.collection'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="normalize-space(substring-after(.,'In:'))"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="starts-with(normalize-space(.), 'ISBN: ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.identifier.isbn'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="normalize-space(substring-after(.,'ISBN:'))"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="starts-with(normalize-space(.), 'No. ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.volume'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="normalize-space(substring-after(.,'No.'))"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="starts-with(normalize-space(.), 'Issue: ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.issue'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="normalize-space(substring-after(.,'Issue:'))"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="starts-with(normalize-space(.), 'Pages: ')">
<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="normalize-space(substring-after(.,'Pages:'))"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="starts-with(normalize-space(.), 'Series: ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.series'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="normalize-space(substring-after(.,'Series:'))"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
<xsl:template match="dc:identifier[matches(text(), '^http.*')]" mode="ARLArbArt">
......@@ -1184,7 +1173,7 @@
</xsl:template>
<xsl:template match="dc:identifier[matches(text(), '^Journal.*')]" mode="ARLArbArt">
<xsl:for-each select="tokenize(text(), ' ; ')">
<xsl:for-each select="tokenize(normalize-space(text()), ' ; ')">
<!-- xsl:if test="starts-with(., 'Journal: ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.journal'"/>
......@@ -1252,7 +1241,7 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.issuetopic'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="replace($issuetopic,'',':')"/>
<xsl:with-param name="value" select="replace($issuetopic,'',':')"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
......@@ -1335,14 +1324,14 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.title'"/>
<xsl:with-param name="language" select="$sanitizedMainLanguage"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</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="$theOtherLanguage"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
......@@ -1426,28 +1415,28 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.abstract'"/>
<xsl:with-param name="language" select="'de'"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() = 1 and $sanitizedLanguage = 'en'">
<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(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() != 1 and $sanitizedLanguage = 'de'">
<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(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() != 1 and $sanitizedLanguage = 'en'">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.abstract'"/>
<xsl:with-param name="language" select="'de'"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
......@@ -1508,7 +1497,7 @@
</xsl:call-template>
</xsl:for-each>
</xsl:if>
<xsl:for-each select="tokenize(text(), ' ; ')">
<xsl:for-each select="tokenize(normalize-space(text()), ' ; ')">
<xsl:if test="starts-with(., 'In: ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.collection'"/>
......@@ -1618,7 +1607,7 @@
</xsl:template>
<xsl:template match="dc:identifier[matches(text(), '^Journal.*')]" mode="ARLForArt">
<xsl:for-each select="tokenize(text(), ' ; ')">
<xsl:for-each select="tokenize(normalize-space(text()), ' ; ')">
<!-- xsl:if test="starts-with(., 'Journal: ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.journal'"/>
......@@ -1686,7 +1675,7 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.issuetopic'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="replace($issuetopic,'',':')"/>
<xsl:with-param name="value" select="replace($issuetopic,'',':')"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
......@@ -1769,14 +1758,14 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.title'"/>
<xsl:with-param name="language" select="$sanitizedMainLanguage"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</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="$theOtherLanguage"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
......@@ -1855,28 +1844,28 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.abstract'"/>
<xsl:with-param name="language" select="'de'"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() = 1 and $sanitizedLanguage = 'en'">
<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(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() != 1 and $sanitizedLanguage = 'de'">
<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(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() != 1 and $sanitizedLanguage = 'en'">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.abstract'"/>
<xsl:with-param name="language" select="'de'"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
......@@ -1991,7 +1980,7 @@
</xsl:template>
<xsl:template match="dc:identifier[matches(text(), '^Journal.*')]" mode="ARLArbMono">
<xsl:for-each select="tokenize(text(), ' ; ')">
<xsl:for-each select="tokenize(normalize-space(text()), ' ; ')">
<!-- xsl:if test="starts-with(., 'Journal: ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.journal'"/>
......@@ -2108,14 +2097,14 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.title'"/>
<xsl:with-param name="language" select="$sanitizedMainLanguage"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</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="$theOtherLanguage"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
......@@ -2191,28 +2180,28 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.abstract'"/>
<xsl:with-param name="language" select="'de'"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() = 1 and $sanitizedLanguage = 'en'">
<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(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() != 1 and $sanitizedLanguage = 'de'">
<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(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() != 1 and $sanitizedLanguage = 'en'">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.abstract'"/>
<xsl:with-param name="language" select="'de'"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
......@@ -2227,20 +2216,20 @@
<xsl:template match="dc:creator" mode="ARLForMono">
<xsl:choose>
<xsl:when test="contains(text(),'Akademie für Raumforschung und Landesplanung')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.contributor.corporateeditor'"/>
<xsl:with-param name="language" select="''"/>
<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.contributor.editor'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="text()"/>
</xsl:call-template>
</xsl:otherwise>
<xsl:when test="contains(text(),'Akademie für Raumforschung und Landesplanung')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.contributor.corporateeditor'"/>
<xsl:with-param name="language" select="''"/>
<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.contributor.editor'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="text()"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
......@@ -2415,14 +2404,14 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.title'"/>
<xsl:with-param name="language" select="$sanitizedMainLanguage"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</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="$theOtherLanguage"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
......@@ -2432,18 +2421,7 @@
<!-- And now comes the ARL Positionspapiere -->
<xsl:template match="oai:OAI-PMH/oai:GetRecord/oai:record/oai:metadata/oai_dc:dc" mode="arlpos">
<!--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:variable name="pubstatus">
<xsl:for-each select="//dc:description">
<xsl:value-of select="text()"/>
<xsl:text> ; </xsl:text>
</xsl:for-each>
</xsl:variable>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.pubstatus'"/>
<xsl:with-param name="language" select="''"/>
......@@ -2520,28 +2498,28 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.abstract'"/>
<xsl:with-param name="language" select="'de'"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() = 1 and $sanitizedLanguage = 'en'">
<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(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() != 1 and $sanitizedLanguage = 'de'">
<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(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="position() != 1 and $sanitizedLanguage = 'en'">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.abstract'"/>
<xsl:with-param name="language" select="'de'"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
......@@ -2656,7 +2634,7 @@
</xsl:template>
<xsl:template match="dc:identifier[matches(text(), '^Journal.*')]" mode="arlpos">
<xsl:for-each select="tokenize(text(), ' ; ')">
<xsl:for-each select="tokenize(normalize-space(text()), ' ; ')">
<!-- xsl:if test="starts-with(., 'Journal: ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.journal'"/>
......@@ -2724,7 +2702,7 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.issuetopic'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="replace($issuetopic,'',':')"/>
<xsl:with-param name="value" select="replace($issuetopic,'',':')"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
......@@ -2807,14 +2785,14 @@
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.title'"/>
<xsl:with-param name="language" select="$sanitizedMainLanguage"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</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="$theOtherLanguage"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[‹›»«]','&quot;'))"/>
<xsl:with-param name="value" select="normalize-space(replace(text(),'[»«]','&quot;'))"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
......@@ -3099,4 +3077,17 @@
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="filterAwayElement">
<!-- not wanted sets get filtered with a too old date issued -->
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.date.issued'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'2000'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.title'"/>
<xsl:with-param name="language" select="'de'"/>
<xsl:with-param name="value" select="'Bitte löschen!'"/>
</xsl:call-template>