Skip to content

Commit

Permalink
REP-1050 entferne altRepGroup Attribute für die Gruppen mit 1 Element
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBorchert committed Mar 21, 2024
1 parent 5955349 commit ed5859f
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:mcrxml="xalan://org.mycore.common.xml.MCRXMLFunctions"
xmlns:mods="http://www.loc.gov/mods/v3"
xmlns:xlink="http://www.w3.org/1999/xlink">

<xsl:include href="copynodes.xsl" />

<xsl:template match="*[string-length(@altRepGroup) &gt; 0]">
<xsl:variable name="altRepGroup" select="@altRepGroup"/>
<xsl:choose>
<xsl:when test="count(../*[@altRepGroup = $altRepGroup]) = 1">
<xsl:copy >
<xsl:apply-templates select="*|@*[local-name() != 'altRepGroup']"/>
</xsl:copy>
</xsl:when>
<xsl:otherwise>
<xsl:copy >
<xsl:apply-templates select="*|@*"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

</xsl:stylesheet>

0 comments on commit ed5859f

Please sign in to comment.