Skip to content

Commit

Permalink
With @joeytakeda and @ebeshero, fix
Browse files Browse the repository at this point in the history
odd2odds so that it does not "justcopy" attDef elements that are not defined in the source class.
This is a bit complicated, see @joeytakeda’s explanation in #687 itself.
  • Loading branch information
sydb committed Jun 24, 2024
1 parent e6fc1c1 commit 1d2ea12
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions odds/odd2odd.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1635,11 +1635,18 @@ of this software, even if advised of the possibility of such damage.
</xsl:for-each>
<!-- class attributes are ones where there is no direct correspondence in
the source for this element -->
<xsl:apply-templates mode="justcopy"
select="tei:attList/tei:attDef[(@mode eq 'change'
or @mode eq 'delete'
or @mode eq 'replace') and
not(@ident=$ORIGINAL/tei:attList//tei:attDef/@ident)]"/>
<xsl:if test="$ORIGINAL/self::tei:elementSpec">
<xsl:apply-templates mode="justcopy"
select="tei:attList/tei:attDef
[
( @mode eq 'change'
or @mode eq 'delete'
or @mode eq 'replace'
)
and
not( @ident = $ORIGINAL/tei:attList//tei:attDef/@ident )
]"/>
</xsl:if>
<!-- any direct attRef elements -->
<xsl:apply-templates mode="justcopy"
select="tei:attList/tei:attRef"/>
Expand Down

0 comments on commit 1d2ea12

Please sign in to comment.