Skip to content

MENDELU/OAI-PMH Updated citation format and added ispartof metadatum into dc.relation#1297

Merged
milanmajchrak merged 1 commit intocustomer/mendelufrom
mendelu/oai-pmh-type-fix
Mar 27, 2026
Merged

MENDELU/OAI-PMH Updated citation format and added ispartof metadatum into dc.relation#1297
milanmajchrak merged 1 commit intocustomer/mendelufrom
mendelu/oai-pmh-type-fix

Conversation

@milanmajchrak
Copy link
Copy Markdown
Collaborator

@milanmajchrak milanmajchrak commented Mar 27, 2026

Problem description

Update because of citacePRO citations.

Analysis

(Write here, if there is needed describe some specific problem. Erase it, when it is not needed.)

Problems

(Write here, if some unexpected problems occur during solving issues. Erase it, when it is not needed.)

Manual Testing (if applicable)

Copilot review

  • Requested review from Copilot

Copilot AI review requested due to automatic review settings March 27, 2026 11:10
@milanmajchrak milanmajchrak merged commit 00d6972 into customer/mendelu Mar 27, 2026
13 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

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 crosswalk to adjust how citation-like identifiers are formatted and to expose dc.relation.ispartof within the standard dc:relation element for better Dublin Core compatibility.

Changes:

  • Updated formatted dc:identifier citation string (punctuation and removed ISSN inclusion).
  • Remapped dc.relation.ispartof output from a custom element (dc:identifier.ispartof) to standard <dc:relation>.

Comment on lines +124 to 127
<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']" />
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The citation formatter emits the ", vol." and ", č." segments unconditionally (lines 124-127), but the xsl:if guard (line 119) only requires any of issued/volume/number to exist. If (for example) only dc.date.issued is present, the output will still include empty volume/number placeholders and punctuation. Consider building the string with per-field conditionals (and separators) so missing fields don’t produce dangling commas/labels.

Suggested change
<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']" />
<xsl:if test="doc:metadata/doc:element[@name='local']/doc:element[@name='volume']/doc:element/doc:field[@name='value']">
<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:if>
<xsl:if test="doc:metadata/doc:element[@name='local']/doc:element[@name='number']/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']" />
</xsl:if>

Copilot uses AI. Check for mistakes.
Comment on lines +119 to 123
<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:text> . </xsl:text>
<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>
<xsl:value-of select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='issued']/doc:element/doc:field[@name='value']" />
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The formatted citation dc:identifier now unconditionally outputs dc.relation.ispartof (line 121), but the surrounding xsl:if guard (line 119) doesn’t check for ispartof. If issued/volume/number exist but ispartof is missing, this will emit a leading ". " and an incomplete citation. Consider either including ispartof in the xsl:if condition, or wrapping the ispartof output (and its trailing punctuation) in its own conditional to avoid stray punctuation and empty segments.

Copilot uses AI. Check for mistakes.
Comment on lines 155 to +156
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element[@name='ispartof']/doc:element/doc:field[@name='value']">
<dc:identifier.ispartof><xsl:value-of select="." /></dc:identifier.ispartof>
<dc:relation><xsl:value-of select="." /></dc:relation>
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

This PR changes the OAI-PMH oai_dc.xsl output (formatted dc:identifier and mapping dc.relation.ispartof). There are existing stylesheet tests for other metadataFormats (e.g., QDCXslTest/RioxxXslTest via AbstractXSLTest), but none appear to cover oai_dc.xsl. Please add/extend a stylesheet test to assert the updated citation formatting and that ispartof is emitted as dc:relation (and no longer as a custom element), to prevent regressions.

Copilot generated this review using guidance from organization custom instructions.
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