My use case is I have an item that has a link in another item. For example, item 123456789/152
has a metadata field dc.relation.hasversion=123456789/717
. Within the item view of 123456789/152
, how can I retrieve the values of the metadata of 123456789/717
? For example, I want to retrieve the dc.language.iso
value of 123456789/717
from 123456789/152
.
I looked at the Related items feature in DSpace but I don't know how the metadata displayed in the Related items list were pulled from the items in that list.
I am using DSpace Version 5.3 Mirage 2 Theme.
EDIT
Based on schweerelos answer, below is my actual code. I am using a custom metadata field dc.relation.languageVersion
. Basically, I want to link to that other version but instead of displaying the value, I will display the dc.language.iso
of the other version in my item-view.xsl
. I've incorporated the answer of schweerelos to this question in the code but it is just displaying the value of dc.relation.languageVersion
. Sample values of dc.relation.languageVersion
are 10665.1/9843
; 10665.1/9844
ie not the complete URI but just the handle.
Thanks in advance!
Actual code
<xsl:template name="itemSummaryView-DIM-other-language">
<xsl:if test="dim:field[@element='relation' and @qualifier='languageVersion' and descendant::text()]">
<div class="col-sm-6 col-print-4 item-page-field-wrapper">
<h5><i18n:text>xmlui.dri2xhtml.METS-1.0.item-languageVersion</i18n:text></h5>
<span>
<xsl:for-each select="dim:field[@element='relation' and @qualifier='languageVersion']">
<xsl:apply-templates select="./node()" mode="showRelatedLang"/>
<xsl:if test="count(following-sibling::dim:field[@element='relation' and @qualifier='languageVersion']) != 0">
<xsl:text>; </xsl:text>
</xsl:if>
</xsl:for-each>
</span>
</div>
</xsl:if>
</xsl:template>
<xsl:template match="dim:field[@element='relation' and @qualifier='languageVersion' and descendant::text()]" mode="showRelatedLang">
<xsl:variable name="otherItemMetadataURL">
<xsl:text>cocoon:/metadata/handle/</xsl:text>
<xsl:value-of select="."/>
<xsl:text>/mets.xml</xsl:text>
</xsl:variable>
<xsl:apply-templates select="document($otherItemMetadataURL)" mode="showLang"/>
</xsl:template>
<xsl:template match="dim:field[@element='language' and @qualifier='iso' and descendant::text()]" mode="showLang">
<xsl:value-of select="util:isoLanguageToDisplay(node())"/>
</xsl:template>