Skip to content

MENDELU/Update OAI-PMH to fix CitacePRO composing#1312

Merged
milanmajchrak merged 3 commits into
customer/mendelufrom
mendelu/oai-pmh-citace-pro
May 12, 2026
Merged

MENDELU/Update OAI-PMH to fix CitacePRO composing#1312
milanmajchrak merged 3 commits into
customer/mendelufrom
mendelu/oai-pmh-citace-pro

Conversation

@milanmajchrak

@milanmajchrak milanmajchrak commented May 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR updates OAI-PMH oai_dc identifier formatting to better match citation requirements used by CitacePRO.

What Changed

  • Updated the composed dc:identifier output in the OAI DC XSL transformation.
  • Replaced the fixed pages suffix (s. 0.) with dynamic page data from metadata (dc.format) when available.
  • Added conditional formatting for conferenceObject records:
    • skips vol. and issue (č.) parts for this type
    • keeps page output in the identifier

Scope

  • 1 file changed
  • 17 additions, 6 deletions
  • No API or database changes

Why

The previous output used a hardcoded page placeholder and did not handle conferenceObject citation formatting correctly.
This change improves metadata quality during OAI-PMH exposure and aligns output with expected citation structure.

Testing

  • Verified OAI DC transformation output for:
    • regular records (volume/issue/pages)
    • conferenceObject records (without volume/issue)
    • missing pages fallback behavior

Copilot AI review requested due to automatic review settings May 12, 2026 11:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the OAI-PMH oai_dc XSL crosswalk to adjust how the formatted dc:identifier string is composed, especially for conferenceObject and bookPart item types (to support CitacePRO formatting expectations).

Changes:

  • Adds item-type detection (conferenceObject, bookPart) to conditionally omit volume/issue in the formatted identifier.
  • Replaces the hardcoded default page placeholder with logic that outputs a metadata-derived value (fallback to 0).
  • Refactors the formatted dc:identifier construction to use XSL variables and conditional blocks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread dspace/config/crosswalks/oai/metadataFormats/oai_dc.xsl
Comment thread dspace/config/crosswalks/oai/metadataFormats/oai_dc.xsl
Comment thread dspace/config/crosswalks/oai/metadataFormats/oai_dc.xsl Outdated
@milanmajchrak milanmajchrak requested a review from Copilot May 12, 2026 12:32
@milanmajchrak milanmajchrak merged commit 2fac4a5 into customer/mendelu May 12, 2026
13 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.

Comment on lines 124 to 125
<xsl:value-of select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element[@name='ispartof']/doc:element/doc:field[@name='value']" />
<xsl:text>. </xsl:text>
<dc:identifier>
<xsl:variable name="isConferenceObject" select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field[@name='value'][normalize-space(.)='conferenceObject']" />
<xsl:variable name="isBookPart" select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field[@name='value'][normalize-space(.)='bookPart']" />
<xsl:variable name="formatValue" select="doc:metadata/doc:element[@name='dc']/doc:element[@name='format']/doc:element/doc:field[@name='value'][1]" />
<xsl:if test="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='issued']/doc:element/doc:field[@name='value'] or doc:metadata/doc:element[@name='local']/doc:element[@name='volume']/doc:element/doc:field[@name='value'] or doc:metadata/doc:element[@name='local']/doc:element[@name='number']/doc:element/doc:field[@name='value']">
<dc:identifier>
<xsl:variable name="isConferenceObject" select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field[@name='value'][normalize-space(.)='conferenceObject']" />
<xsl:variable name="isBookPart" select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field[@name='value'][normalize-space(.)='bookPart']" />
Comment on lines +127 to +131
<xsl:if test="not($isConferenceObject or $isBookPart)">
<xsl:text>, vol. </xsl:text>
<xsl:value-of select="doc:metadata/doc:element[@name='local']/doc:element[@name='volume']/doc:element/doc:field[@name='value']" />
<xsl:text>, č. </xsl:text>
<xsl:value-of select="doc:metadata/doc:element[@name='local']/doc:element[@name='number']/doc:element/doc:field[@name='value']" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants