3

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.

Anup Das
  • 31
  • 1
  • I am glad that you re-posted the question. From a DSpace perspective, this is an appropriate question. – terrywb Jan 31 '17 at 04:26
  • I took a look at my OAI repository, and I confirmed that my custom metadata schema is present. Have you created a custom XSLT crosswalk that attempts to access these fields? – terrywb Jan 31 '17 at 04:42
  • While waiting for a more complete answer from someone with a deeper knowledge of this topic than me, you might want to take a look a those files: https://github.com/DSpace/DSpace/tree/master/dspace/config/crosswalks/oai/metadataFormats. As far as I know, they contain the XLS transformation defining your OAI output, for each possible prefix. – Benoît Wéry Jan 31 '17 at 12:24

1 Answers1

0

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.

Benoît Wéry
  • 862
  • 1
  • 6
  • 8