Adding field `oaire.version` to the OAI

49 views
Skip to first unread message

Javi Rojo Díaz

unread,
Nov 13, 2024, 9:45:09 AM11/13/24
to DSpace Technical Support
Good afternoon. 

I am having trouble adding the field `oaire.version` to the OAI. I see that DSpace does not add this OpenAIRE field by default, so I added the following configuration in `/dspace/dspace/config/crosswalks/oai/metadataFormats/oai_openaire.xsl:


<xsl:template
        match="doc:element[@name='oaire']/doc:element[@name='version']"
        mode="oaire">
        <oaire:version>
            <xsl:value-of select="./doc:element/doc:field[@name='value']"/>
        </oaire:version>
    </xsl:template>



Then, I performed a full OAI import by running `./dspace oai import -c`, but the field `oaire:version` still does not appear in the OAI.

I also tried reindexing Solr and restarting Tomcat, but it still doesn’t show up. 

Am I missing any other steps? Could you help me? Here is the test item in the OAI. I should mention that the item has the field `oaire.version` created in DSpace:


Thank you very much.

Javi Rojo Díaz

unread,
Nov 18, 2024, 9:30:54 AM11/18/24
to DSpace Technical Support
Hello again.

I forgot to mention that the version of DSpace is 7.6. Any small help would be greatly appreciated. 

Thank you and best regards.

Javi Rojo Díaz

unread,
Nov 19, 2024, 5:00:37 AM11/19/24
to DSpace Technical Support
Good morning, 

I finally managed to load the "oaire.version" field and make it visible in the OAI. 

It seems I had created the template:

    <xsl:template

        match="doc:element[@name='oaire']/doc:element[@name='version']"

        mode="oaire">

        <oaire:version>

            <xsl:value-of select="./doc:element/doc:field[@name='value']"/>

        </oaire:version>

    </xsl:template>



but it was missing the application of that template with the following configuration:

            <xsl:apply-templates

            select="doc:metadata/doc:element[@name='oaire']/doc:element[@name='version']" mode="oaire"/>


 Finally, I restarted Tomcat, cleared OAI cache and perform a complete OAI import, and now the field oaire:version is visible in the OAI: 

systemctl restart tomcat

./dspace oai clean-cache

./dspace oai import -c



I hope this helps someone. Best regards.

Reply all
Reply to author
Forward
0 new messages