DSpace OAI-PMH harvesting metadata export

697 Views Asked by At

I wish to expose additional metadata via OAI-PMH in my DSpace instance. I have added a new metadata schema "lrmi" and also added some metadata fields. Through the submission forms I have been able to use the fields in my lrmi schema. However, I seem unable to expose these fields in the DSpace OAI-PMH interface, as it only exposes fields from the dc schema. How can custom fields from a new schema be exposed in the OAI-PMH interface? The same problem occurs with "IEEE-LOM" schema also. I think the question has enough relevance for this forum but not sure why this was closed from one of my earlier posts.

1

There are 1 best solutions below

0
On

I was curious about your question, made a few more researches and tests. Turns out that editing those files I mentioned in an earlier comment will indeed do what you're trying to achieve.

If you want to expose custom fields under dc schema

You simply have to add, in the XSL, blocks similar to the ones that are already present. E.g. you want to expose the content of your custom.test field into dc:description, you can add:

<xsl:for-each select="doc:metadata/doc:element[@name='custom']/doc:element[@name='test']/doc:element/doc:field[@name='value']">
    <dc:description><xsl:value-of select="." /></dc:description>
</xsl:for-each>

If you want to expose custom fields under custom schema

You can do exactly the same, but by replacing the dc:description tag with your custom schema:element. You'll need to declare that custom schema in the main <oai_dc:dc> tag under xmlns:

<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" 
    xmlns:dc="http://purl.org/dc/elements/1.1/" 
    xmlns:custom="SOME_URL" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">

then

<xsl:for-each select="doc:metadata/doc:element[@name='custom']/doc:element[@name='test']/doc:element/doc:field[@name='value']">
                <custom:test><xsl:value-of select="." /></custom:test>
        </xsl:for-each>
</oai_dc:dc>

Note: although this works from a technical point of view, it might however be conflicting with some functional recommendations / business best practices.