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

WIP

parent 7b311723
......@@ -368,9 +368,15 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.description.misc", "icj-273") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.identifier.issn", "2196-9485") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.identifier.url", "http://www.interculture-journal.com/index.php/icj/article/view/273") ) );
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.publisher.country", "DEU") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.rights.licence", "20") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.source.issue", "26") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.source.issuetopic", "(Inter-)Kulturalität neu denken!") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.source.pageinfo", "43-58") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.source.pageinfo") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("dc.title", "en", "Vietnam: Economic Strategy and Economic Reality") ) );
......
......@@ -184,13 +184,23 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="nlm:issue">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.identifier.url'"/>
<xsl:with-param name="key" select="'dc.source.issue'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="@xlink:href"/>
<xsl:with-param name="value" select="text()"/>
</xsl:call-template>
</xsl:template>
<xsl:template match="nlm:issue-title">
<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="text()"/>
</xsl:call-template>
</xsl:template>
......
......@@ -54,6 +54,18 @@
</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: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 name="new-metadatum">
<xsl:param name="key" />
<xsl:param name="language" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment