MENDELU/Update OAI-PMH to fix CitacePRO composing#1312
Merged
Conversation
…the conferenceObject has a different format
2 tasks
There was a problem hiding this comment.
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:identifierconstruction to use XSL variables and conditional blocks.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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']" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates OAI-PMH
oai_dcidentifier formatting to better match citation requirements used by CitacePRO.What Changed
dc:identifieroutput in the OAI DC XSL transformation.s. 0.) with dynamic page data from metadata (dc.format) when available.conferenceObjectrecords:vol.and issue (č.) parts for this typeScope
Why
The previous output used a hardcoded page placeholder and did not handle
conferenceObjectcitation formatting correctly.This change improves metadata quality during OAI-PMH exposure and aligns output with expected citation structure.
Testing
conferenceObjectrecords (without volume/issue)