Skip to content

Commit

Permalink
IM-98 fixed filter - have to create empty mods
Browse files Browse the repository at this point in the history
  • Loading branch information
kkrebs committed Nov 29, 2024
1 parent 49c6454 commit 8379c91
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions src/main/resources/xslt/orcid2/orcid-object-filter.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,27 @@
<xsl:include href="copynodes.xsl" />

<xsl:template match="/">
<xsl:if test="//servflag[@type='status'] = 'confirmed'">
<xsl:apply-templates />
</xsl:if>
<xsl:choose>
<xsl:when test="//servflag[@type='status'] = 'confirmed'">
<mycoreobject>
<xsl:apply-templates select="@*" />
<xsl:apply-templates select="structure" />
<!-- create empty mods container -->
<metadata>
<def.modsContainer class="MCRMetaXML" heritable="false" notinherit="true">
<modsContainer inherited="0">
<mods:mods />
</modsContainer>
</def.modsContainer>
</metadata>
<xsl:apply-templates select="service" />
</mycoreobject>
<xsl:apply-templates />
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates />
</xsl:otherwise>
</xsl:choose>
</xsl:template>

</xsl:stylesheet>

0 comments on commit 8379c91

Please sign in to comment.