Commit 6470111d authored by Gerrit Hübbers's avatar Gerrit Hübbers 🃏
Browse files

Improve Onix XSLT transformation with transcript Verlag example

parent f5679ca2
package org.gesis.dda.xslt;
import org.gesis.dda.feeder.ssoar.Licence;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class XsltUtil {
private final static Logger LOG = LoggerFactory.getLogger(XsltUtil.class);
public static String hyphenizeIsbn(String input) {
String result;
// 978-3-8474-0969-4
......@@ -14,4 +20,180 @@ public class XsltUtil {
return result;
}
public static String getAppropriateSsoarLicenceInternalId(String input) {
String result;
Licence licenceResult = null;
boolean isCreativeCommons = false;
boolean isBy = false;
boolean isSa = false;
boolean isNc = false;
boolean isNd = false;
boolean isPublicDomain = false;
String version = null;
String inputLowerCase = input.toLowerCase();
if ( inputLowerCase.contains("creativecommons") || inputLowerCase.contains("cc") ) {
isCreativeCommons = true;
}
if ( inputLowerCase.contains("by") ) {
isBy = true;
}
if ( inputLowerCase.contains("sa") ) {
isSa = true;
}
if ( inputLowerCase.contains("nc") ) {
isNc = true;
}
if ( inputLowerCase.contains("nd") ) {
isNd = true;
}
if ( inputLowerCase.contains("nd") ) {
isNd = true;
}
if ( inputLowerCase.contains("zero") || inputLowerCase.contains("CC0") ) {
isPublicDomain = true;
}
if ( inputLowerCase.contains("4.0") ) {
version = "4.0";
}
else if ( inputLowerCase.contains("3.0") ) {
version = "3.0";
}
else if ( inputLowerCase.contains("2.0") ) {
version = "2.0";
}
else if ( inputLowerCase.contains("1.0") ) {
version = "1.0";
}
if ( isCreativeCommons && !isPublicDomain && isBy && !isSa && !isNc && !isNd) {
if (null == version) {
licenceResult = Licence.CC_BY;
}
else if ( "1.0".equals(version) ) {
licenceResult = Licence.CC_BY_1_0;
}
else if ( "2.0".equals(version) ) {
licenceResult = Licence.CC_BY_2_0;
}
else if ( "3.0".equals(version) ) {
licenceResult = Licence.CC_BY_3_0;
}
else if ( "4.0".equals(version) ) {
licenceResult = Licence.CC_BY_4_0;
}
}
else if ( isCreativeCommons && !isPublicDomain && isBy && !isSa && isNc && isNd) {
if (null == version) {
licenceResult = Licence.CC_BY_NC_ND;
}
else if ( "1.0".equals(version) ) {
licenceResult = Licence.CC_BY_NC_ND_1_0;
}
else if ( "2.0".equals(version) ) {
licenceResult = Licence.CC_BY_NC_ND_2_0;
}
else if ( "3.0".equals(version) ) {
licenceResult = Licence.CC_BY_NC_ND_3_0;
}
else if ( "4.0".equals(version) ) {
licenceResult = Licence.CC_BY_NC_ND_4_0;
}
}
else if ( isCreativeCommons && !isPublicDomain && isBy && isSa && !isNc && !isNd) {
if (null == version) {
licenceResult = Licence.CC_BY_SA;
}
else if ( "1.0".equals(version) ) {
licenceResult = Licence.CC_BY_SA_1_0;
}
else if ( "2.0".equals(version) ) {
licenceResult = Licence.CC_BY_SA_2_0;
}
else if ( "3.0".equals(version) ) {
licenceResult = Licence.CC_BY_SA_3_0;
}
else if ( "4.0".equals(version) ) {
licenceResult = Licence.CC_BY_SA_4_0;
}
}
else if ( isCreativeCommons && !isPublicDomain && isBy && !isSa && !isNc && isNd) {
if (null == version) {
licenceResult = Licence.CC_BY_ND;
}
else if ( "1.0".equals(version) ) {
licenceResult = Licence.CC_BY_ND_1_0;
}
else if ( "2.0".equals(version) ) {
licenceResult = Licence.CC_BY_ND_2_0;
}
else if ( "3.0".equals(version) ) {
licenceResult = Licence.CC_BY_ND_3_0;
}
else if ( "4.0".equals(version) ) {
licenceResult = Licence.CC_BY_ND_4_0;
}
}
else if ( isCreativeCommons && !isPublicDomain && isBy && !isSa && isNc && !isNd) {
if (null == version) {
licenceResult = Licence.CC_BY_NC;
}
else if ( "1.0".equals(version) ) {
licenceResult = Licence.CC_BY_NC_1_0;
}
else if ( "2.0".equals(version) ) {
licenceResult = Licence.CC_BY_NC_3_0;
}
else if ( "3.0".equals(version) ) {
licenceResult = Licence.CC_BY_NC_3_0;
}
else if ( "4.0".equals(version) ) {
licenceResult = Licence.CC_BY_NC_4_0;
}
}
else if ( isCreativeCommons && !isPublicDomain && isBy && isSa && isNc && !isNd) {
licenceResult = Licence.CC_BY_NC_SA;
if (null == version) {
licenceResult = Licence.CC_BY_NC_SA;
}
else if ( "1.0".equals(version) ) {
licenceResult = Licence.CC_BY_NC_SA_1_0;
}
else if ( "2.0".equals(version) ) {
licenceResult = Licence.CC_BY_NC_SA_2_0;
}
else if ( "3.0".equals(version) ) {
licenceResult = Licence.CC_BY_NC_SA_3_0;
}
else if ( "4.0".equals(version) ) {
licenceResult = Licence.CC_BY_NC_SA_4_0;
}
}
else if ( isCreativeCommons && isPublicDomain ) {
licenceResult = Licence.CC_0;
}
if (null != licenceResult) {
result = licenceResult.getInternalIdentifierLicenceMetadatum().getValue();
}
else {
LOG.warn("Could not identify licence for input={}", input);
result = null;
}
return result;
}
}
......@@ -669,6 +669,27 @@ public class ContentResolverTest {
assertTrue(isEqual);
}
@Test
public void resolveTranscriptVerlag() throws MalformedURLException, IOException {
String underTest = "http://www.transcript-verlag.de/978-3-8376-3712-0";
Metadatum metadatum = new SimpleMetadatum("dc.identifier.uri", underTest);
Set<Metadatum> metadata = ImmutableSet.of(metadatum);
InputStream expectedInputStream = new URL("https://www.transcript-verlag.de/media/pdf/8f/94/03/oa9783839437124.pdf").openStream();
assertNotNull(expectedInputStream);
Set<InputStreamAndFilenameSupplier> suppliers = ContentResolver.resolveContentsSuppliers(metadata);
assertEquals(1, suppliers.size());
InputStreamAndFilenameSupplier actualSupplier = suppliers.iterator().next();
LOG.info("resolved URL is {}", actualSupplier.getFilename() );
InputStream actualInputStream = actualSupplier.get();
LOG.info("actualInputStream={}", actualInputStream);
assertNotNull(actualInputStream);
boolean isEqual = IOUtils.contentEquals(actualInputStream, expectedInputStream);
assertTrue(isEqual);
}
public static String unrootDomainName(String url) {
try {
String result;
......
......@@ -7,6 +7,7 @@ import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
......@@ -68,7 +69,7 @@ public class XmlXsltBundlesStreamSourceTest {
}
@Test
public void exerciseBundlesStreamSource() throws IOException {
public void testBudrichVerlagOnix() throws IOException {
String onixXmlString = IOUtils.toString(
getClass().
getClassLoader().
......@@ -132,6 +133,12 @@ public class XmlXsltBundlesStreamSourceTest {
assertEquals(1, regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.publisher.city")).count() );
assertEquals("Opladen", regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.publisher.city")).findFirst().get().getValue() );
assertEquals(1, regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.description.review")).count() );
assertEquals("2", regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.description.review")).findFirst().get().getValue() );
assertEquals(1, regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.description.pubstatus")).count() );
assertEquals("1", regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.description.pubstatus")).findFirst().get().getValue() );
assertEquals(1, regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.identifier.doi")).count() );
assertEquals("https://doi.org/10.3224/84740518", regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.identifier.doi")).findFirst().get().getValue() );
......@@ -158,7 +165,13 @@ public class XmlXsltBundlesStreamSourceTest {
assertEquals(0, regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.source.edition")).count() );
assertEquals(1, regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.type.stock")).count() );
assertEquals("article", regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.type.stock")).findFirst().get().getValue() );
assertEquals("monograph", regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.type.stock")).findFirst().get().getValue() );
assertEquals(1, regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.type.document")).count() );
assertEquals("20", regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.type.document")).findFirst().get().getValue() );
assertEquals(1, regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("ssoar.contributor.institution")).count() );
assertEquals("Verlag Barbara Budrich", regierenBundle.getMetadata().stream().filter(m -> m.getKey().equals("ssoar.contributor.institution")).findFirst().get().getValue() );
}
{
......@@ -176,6 +189,9 @@ public class XmlXsltBundlesStreamSourceTest {
assertEquals(1, bildungsforschungBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.type.stock")).count() );
assertEquals("collection", bildungsforschungBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.type.stock")).findFirst().get().getValue() );
assertEquals(1, bildungsforschungBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.type.document")).count() );
assertEquals("24", bildungsforschungBundle.getMetadata().stream().filter(m -> m.getKey().equals("dc.type.document")).findFirst().get().getValue() );
}
}
......@@ -258,7 +274,7 @@ public class XmlXsltBundlesStreamSourceTest {
assertEquals(0, metadata.stream().filter(m -> m.getKey().equals("dc.source.edition")).count() );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.type.stock")).count() );
assertEquals("article", metadata.stream().filter(m -> m.getKey().equals("dc.type.stock")).findFirst().get().getValue() );
assertEquals("monograph", metadata.stream().filter(m -> m.getKey().equals("dc.type.stock")).findFirst().get().getValue() );
}
@Test
......@@ -298,8 +314,8 @@ public class XmlXsltBundlesStreamSourceTest {
assertEquals(1, regierenBundleMetadataDcIdentifierIsbn.count() );
assertEquals("978-3-8394-3712-4", metadata.stream().filter(m -> m.getKey().equals("dc.identifier.isbn")).findFirst().get().getValue() );
Stream<Metadatum> regierenBundleMetadataDcLanguage = metadata.stream().filter(m -> m.getKey().equals("dc.language"));
assertEquals(1, regierenBundleMetadataDcLanguage.count() );
Stream<Metadatum> dcLanguage = metadata.stream().filter(m -> m.getKey().equals("dc.language"));
assertEquals(1, dcLanguage.count() );
assertEquals("de", metadata.stream().filter(m -> m.getKey().equals("dc.language")).findFirst().get().getValue() );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.publisher")).count() );
......@@ -312,7 +328,7 @@ public class XmlXsltBundlesStreamSourceTest {
assertEquals("DEU", metadata.stream().filter(m -> m.getKey().equals("dc.publisher.country")).findFirst().get().getValue() );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.publisher.city")).count() );
assertEquals("Opladen", metadata.stream().filter(m -> m.getKey().equals("dc.publisher.city")).findFirst().get().getValue() );
assertEquals("Bielefeld", metadata.stream().filter(m -> m.getKey().equals("dc.publisher.city")).findFirst().get().getValue() );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.identifier.doi")).count() );
assertEquals("https://doi.org/10.14361/9783839437124", metadata.stream().filter(m -> m.getKey().equals("dc.identifier.doi")).findFirst().get().getValue() );
......@@ -320,9 +336,8 @@ public class XmlXsltBundlesStreamSourceTest {
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.source.pageinfo")).count() );
assertEquals("398", metadata.stream().filter(m -> m.getKey().equals("dc.source.pageinfo")).findFirst().get().getValue() );
Set<Metadatum> dcSubjectOtherMetadata = metadata.stream().filter(m -> m.getKey().equals("dc.subject.other")).collect( Collectors.toSet() );
Set<Metadatum> dcSubjectOtherMetadata = metadata.stream().filter(m -> m.getKey().equals("dc.subject.other")).collect( Collectors.toSet() );
assertEquals(26, dcSubjectOtherMetadata.size() );
assertEquals(1, dcSubjectOtherMetadata.stream().filter( m -> "Populismus".equals( m.getValue() ) ).count() );
......@@ -353,7 +368,6 @@ public class XmlXsltBundlesStreamSourceTest {
assertEquals(1, dcSubjectOtherMetadata.stream().filter( m -> "Political Science".equals( m.getValue() ) ).count() );
Set<Metadatum> dcDescriptionAbstractMetadata = metadata.stream().filter(m -> m.getKey().equals("dc.description.abstract")).collect( Collectors.toSet() );
dcDescriptionAbstractMetadata.stream().map(Object::toString).forEach(LOG::info);
assertEquals(2, dcDescriptionAbstractMetadata.size() );
......@@ -363,11 +377,41 @@ public class XmlXsltBundlesStreamSourceTest {
Metadatum expectedAbstractDe = new SimpleMetadatum("dc.description.abstract", "de", "<p>Die Schweizerische Volkspartei ist binnen 25 Jahren von einer braven Klientelpartei zum politischen Taktgeber avanciert. Sie ist nicht nur die stärkste politische Kraft des Landes, sondern auch ein Vorbild des europäischen Rechtspopulismus.<br />Marius Hildebrand beleuchtet die Karriere der SVP mithilfe der formalen Populismustheorie Ernesto Laclaus. Im Unterschied zu sozialstrukturellen und ideologiekritischen Analysen, die den Populismus als Anomalie perspektivieren, wird er hier als Effekt einer diskursiven Transformation der politischen Schweiz betrachtet.</p>");
assertTrue( dcDescriptionAbstractMetadata.contains(expectedAbstractDe) );
assertEquals(0, metadata.stream().filter(m -> m.getKey().equals("dc.source.series")).count() );
List<Metadatum> dcSourceSeriesMetadata = metadata.stream().filter(m -> m.getKey().equals("dc.source.series")).collect(Collectors.toList() );
assertEquals(1, dcSourceSeriesMetadata.size() );
Metadatum dcSourceSeriesMetadatum = dcSourceSeriesMetadata.get(0);
assertEquals("Kultur und Kollektiv", dcSourceSeriesMetadatum.getValue() );
assertEquals(0, metadata.stream().filter(m -> m.getKey().equals("dc.source.edition")).count() );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.source.volume")).count() );
assertEquals("4", metadata.stream().filter(m -> m.getKey().equals("dc.source.volume")).findFirst().get().getValue() );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.type.stock")).count() );
assertEquals("article", metadata.stream().filter(m -> m.getKey().equals("dc.type.stock")).findFirst().get().getValue() );
assertEquals("monograph", metadata.stream().filter(m -> m.getKey().equals("dc.type.stock")).findFirst().get().getValue() );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.type.document")).count() );
assertEquals("20", metadata.stream().filter(m -> m.getKey().equals("dc.type.document")).findFirst().get().getValue() );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.description.pubstatus")).count() );
assertEquals("1", metadata.stream().filter(m -> m.getKey().equals("dc.description.pubstatus")).findFirst().get().getValue() );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.description.review")).count() );
assertEquals("2", metadata.stream().filter(m -> m.getKey().equals("dc.description.review")).findFirst().get().getValue() );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.identifier.uri")).count() );
assertEquals("http://www.transcript-verlag.de/978-3-8376-3712-0", metadata.stream().filter(m -> m.getKey().equals("dc.identifier.uri")).findFirst().get().getValue() );
// CC_BY_NC_ND_3_0
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.rights.licence")).count() );
assertEquals("19", metadata.stream().filter(m -> m.getKey().equals("dc.rights.licence")).findFirst().get().getValue() );
///////////////
metadata = underTest.getAllMetadata("10039-9783839437575");
// CC_BY_NC_ND_4_0
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.rights.licence")).count() );
assertEquals("20", metadata.stream().filter(m -> m.getKey().equals("dc.rights.licence")).findFirst().get().getValue() );
}
}
......@@ -80,31 +80,31 @@
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'collection'" />
</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="'24'" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<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:with-param name="value" select="'monograph'" />
</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="'20'" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<!--
<xsl:apply-templates select="oai:OAI-PMH/oai:GetRecord/oai:record/oai:metadata/nlm:article" />
<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.source.journal'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'132'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'ssoar.contributor.institution'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'FQS'"/>
<xsl:with-param name="value" select="'Verlag Barbara Budrich'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
......@@ -113,18 +113,12 @@
<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="'DEU'"/>
</xsl:call-template>
<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:with-param name="value" select="'2'"/>
</xsl:call-template>
-->
</xsl:element>
</xsl:element>
</xsl:template>
......@@ -299,7 +293,6 @@
<xsl:if test="$language != ''">
<xsl:variable name="sanitizedLanguage" select="java:com.neovisionaries.i18n.LanguageCode.getByCodeIgnoreCase( $language )" />
<xsl:message terminate="no">sanitizedLanguage=<xsl:value-of select='$sanitizedLanguage' /> </xsl:message>
<xsl:element name="language">
<xsl:value-of select="$sanitizedLanguage" />
</xsl:element>
......
......@@ -65,11 +65,12 @@
<xsl:apply-templates select="othertext" />
<xsl:apply-templates select="series" />
<xsl:apply-templates select="b057" />
<xsl:apply-templates select="productwebsite" />
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher.city'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'Opladen'"/>
<xsl:with-param name="value" select="'Bielefeld'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
......@@ -78,7 +79,6 @@
<xsl:with-param name="value" select="'DEU'"/>
</xsl:call-template>
<xsl:choose>
<xsl:when test="contributor[b035 = 'B01']/b037">
<xsl:call-template name="new-metadatum">
......@@ -86,31 +86,31 @@
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'collection'" />
</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="'24'" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<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:with-param name="value" select="'monograph'" />
</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="'20'" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<!--
<xsl:apply-templates select="oai:OAI-PMH/oai:GetRecord/oai:record/oai:metadata/nlm:article" />
<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.source.journal'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'132'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'ssoar.contributor.institution'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'FQS'"/>
<xsl:with-param name="value" select="'transcript Verlag'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
......@@ -119,18 +119,12 @@
<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="'DEU'"/>
</xsl:call-template>
<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:with-param name="value" select="'2'"/>
</xsl:call-template>
-->
</xsl:element>
</xsl:element>
</xsl:template>
......@@ -271,14 +265,43 @@
</xsl:call-template>
</xsl:template>
<xsl:template match="series">
<xsl:template match="othertext[d102 = '46']">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.source.series'"/>
<xsl:with-param name="key" select="'dc.rights.licence'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="b018" />
<xsl:with-param name="value" select="java:org.gesis.dda.xslt.XsltUtil.getAppropriateSsoarLicenceInternalId( d104/text() )" />
</xsl:call-template>
</xsl:template>
<xsl:template match="series">
<xsl:if test="b018 != '' ">
<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="b018" />
</xsl:call-template>
</xsl:if>
<xsl:if test="b019 != '' ">
<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="b019" />
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="productwebsite">
<xsl:if test="f123 != '' ">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.identifier.uri'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="f123" />
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="b057">
<xsl:if test="text() != 1">
<xsl:call-template name="new-metadatum">
......@@ -307,7 +330,6 @@