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

Finalize FEATURE

parent 41016467
......@@ -939,6 +939,8 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
LOG.info("{}", bundle);
Set<Metadatum> metadata = bundle.getMetadata();
metadata.stream().map(Object::toString).forEach(LOG::info);
LOG.info("-----------------------");
// bss.getBundlesStream().map(Object::toString).forEach(LOG::info);
}
......
......@@ -51,7 +51,6 @@
<xsl:template match="xoai:element">
<xsl:param name="keyHead" />
<xsl:message terminate="no">keyHead=<xsl:value-of select="$keyHead" /> and @name=<xsl:value-of select="@name" /></xsl:message>
<xsl:apply-templates>
<xsl:with-param name="keyHead">
<xsl:choose>
......@@ -68,14 +67,21 @@
<xsl:template match="xoai:field[@name='value']">
<xsl:param name="keyHead" />
<xsl:param name="nameLanguageAttribute" />
<xsl:message terminate="no">inside field: keyHead=<xsl:value-of select="$keyHead" /> and @nameAttribute=<xsl:value-of select="@nameLanguageAttribute" /></xsl:message>
<xsl:variable name="rawLanguage">
<xsl:value-of select="tokenize($keyHead,'\.')[last()]"/>
</xsl:variable>
<xsl:message terminate="no">rawLanguage=<xsl:value-of select="$rawLanguage"/> </xsl:message>
<xsl:variable name="cleanedLanguage">
<xsl:choose>
<xsl:when test="$rawLanguage = 'none'">
<xsl:value-of select="null" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$rawLanguage" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="metadatumKey">
<xsl:call-template name="substring-before-last">
......@@ -83,11 +89,10 @@
<xsl:with-param name="lastNeedle" select="'.'" />
</xsl:call-template>
</xsl:variable>
<xsl:message terminate="no">metadatumKey=<xsl:value-of select="$metadatumKey"/> </xsl:message>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="$metadatumKey"/>
<xsl:with-param name="language" select="$rawLanguage"/>
<xsl:with-param name="language" select="$cleanedLanguage"/>
<xsl:with-param name="value" select="text()"/>
</xsl:call-template>
</xsl:template>
......
Supports Markdown
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