Hi,
Yes, you can do this – at least in 5.8 XMLUI Mirage2 we are.
We’ve first got variables:
<xsl:variable name="file_id" select="jstring:replaceAll(jstring:replaceAll(string(@ADMID), '_METSRIGHTS', ''), 'rightsMD_', '')"/>
<xsl:variable name="rights_declaration" select="../../../mets:amdSec/mets:rightsMD[@ID = concat('rightsMD_', $file_id, '_METSRIGHTS')]/mets:mdWrap/mets:xmlData/rights:RightsDeclarationMD"/>
<xsl:variable name="rights_context" select="$rights_declaration/rights:Context"/>
<xsl:variable name="users">
<xsl:for-each select="$rights_declaration/*">
<xsl:value-of select="rights:UserName"/>
<xsl:choose>
<xsl:when test="rights:UserName/@USERTYPE = 'GROUP'">
<xsl:text> (group)</xsl:text>
</xsl:when>
<xsl:when test="rights:UserName/@USERTYPE = 'INDIVIDUAL'">
<xsl:text> (individual)</xsl:text>
</xsl:when>
</xsl:choose>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>
</xsl:variable>
Then we can do a test like:
<xsl:when test="$users='AQD (group)'">
Other things we test for are whether any embargo has expired:
test="$rights_context/@in-effect)='true'"
and whether it’s available for the current user:
test="contains(mets:FLocat[@LOCTYPE='URL']/@xlink:href,'isAllowed=y')"
If you need to troubleshoot you can see the raw METS xml at eg
https://example.com/metadata/handle/12345/1234/mets.xml
Deborah
--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct:
https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dspace-tech...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dspace-tech/685deb8c-208a-4590-811b-898d2ae71542o%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to dspac...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/685deb8c-208a-4590-811b-898d2ae71542o%40googlegroups.com.
Oh, bother. You’re right, I don’t see that section in my own mets file either and I now have vague memories of when I first discovered its absence. Sadly the memories are so vague I can’t remember if I found a solution so that we could see that metadata, or if I just worked ‘blind’ taking on faith that the data was still there somewhere, just invisible. I may have at least found the metadata structure somewhere via a websearch so that I knew where it *ought* to be.
To unsubscribe from this group and stop receiving emails from it, send an email to
dspace-tech...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dspace-tech/24abc41c-b555-4531-afe8-571ccd865fefo%40googlegroups.com.