XSLT entry for oai_dc.xsl to expose bitstream URL

17 views
Skip to first unread message

Parthasarathi Mukhopadhyay

unread,
Jun 2, 2019, 11:42:52 PM6/2/19
to DSpace Community
Dear all

Could you plz guide me in the following endeavour?

We want to export full URL of bitstream like
(as performed when we use xoai as metadataPrefix)

oai_dc.xml is exporting only URI not full bitstream path like
<dc:identifier>http://localhost:8080/xmlui/handle/123456789/3</dc:identifier>

Is there any way to add XSLT entry in oai_dc.xsl so that the full bitstream path exported in OAI/PMH response? What DC element should hold that value? can it be done on the fly without disturbing existing metadata registry?

Regards
-----------------------------------------------------------------------
Dr. Parthasarathi Mukhopadhyay
Professor & Head, Department of Library and Information Science,
University of Kalyani, Kalyani - 741 235 (WB), India
-----------------------------------------------------------------------

Michael White

unread,
Jun 3, 2019, 3:26:41 AM6/3/19
to Parthasarathi Mukhopadhyay, DSpace Community

Hi,

 

We had a requirement to add the bitstream links to our oai-dc OAI-PMH output for one of the services that harvests our content – we needed to put the Bitstream URLs in <dc.identifier> for this service, and I achieved it by adding the following to my oai_dc.xsl file:

 

<!-- ******* URLs for digital object(s) (obtained from file 'bundles') ******* -->

<!-- URLs put in <dc.identifier> OAI-PMH elements                              -->

<xsl:for-each select="doc:metadata/doc:element[@name='bundles']/doc:element[@name='bundle']">

                <!-- ******* URLs for content bitstreams (from ORIGINAL bundle): <dc:identifier> ******* -->

                <xsl:if test="doc:field[@name='name']/text() = 'ORIGINAL'">

                                <xsl:for-each select="doc:element[@name='bitstreams']/doc:element">

                                                <dc:identifier><xsl:value-of select="doc:field[@name='url']/text()" /></dc:identifier>

                                </xsl:for-each>

                </xsl:if>

</xsl:for-each>

 

- if you need to put the bitstream URLs in a different element, you should be able to do that by simply changing the dc element that appears in this line:

 

<dc:identifier><xsl:value-of select="doc:field[@name='url']/text()" /></dc:identifier>

 

I hope that helps,

 

Mike

 

Michael White

Senior Developer

Business Applications and Integrations

 

T: (01786) 466877

E: michae...@stir.ac.uk

A: 4B19, Cottrell, University of Stirling, Stirling, FK9 4LA

--
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 Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-communi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-community/CAGM_5ubGga7JD%3D%3DwXEf1d-LNsOujeL6w8nHtLaVnD2pUSr2T_Q%40mail.gmail.com.


The University is ranked in the QS World Rankings of the top 5% of universities in the world (QS World University Rankings, 2016/17)
The University of Stirling is a charity registered in Scotland, number SC 011159.

Parthasarathi Mukhopadhyay

unread,
Jun 3, 2019, 6:08:56 AM6/3/19
to Michael White, DSpace Community
Thanks a lot.  It will serve my purpose. 

Regards
Reply all
Reply to author
Forward
0 new messages