Skip to content

Commit

Permalink
Fix #635:
Browse files Browse the repository at this point in the history
Added clause testing for type=deprecationInfo so we don't get 2+ nodes being tested on one side of 'gt'.
  • Loading branch information
sydb committed Oct 16, 2023
1 parent ce346af commit a12ae39
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions common/functions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1233,12 +1233,14 @@ of this software, even if advised of the possibility of such damage.
<doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
<desc>whether there is an out-of-date desc or gloss in the translation language</desc>
</doc>
<xsl:function name="tei:descOrGlossOutOfDate">
<xsl:function name="tei:descOrGlossOutOfDate" as="xs:boolean">
<xsl:param name="context"/>
<xsl:for-each select="$context">
<xsl:variable name="lang" select="tei:generateDocumentationLang(.)[1]"/>
<xsl:sequence select="tei:desc[@xml:lang='en']/@versionDate gt tei:desc[@xml:lang=$lang]/@versionDate
or tei:gloss[@xml:lang='en']/@versionDate gt tei:gloss[@xml:lang=$lang]/@versionDate"></xsl:sequence>
<xsl:sequence select="tei:gloss[@xml:lang eq 'en']/@versionDate gt tei:gloss[ @xml:lang eq $lang]/@versionDate
or tei:desc[@xml:lang='en' and not( @type eq 'deprecationInfo' )]/@versionDate
gt
tei:desc[@xml:lang eq $lang and not( @type eq 'deprecationInfo' )]/@versionDate" />
</xsl:for-each>
</xsl:function>

Expand Down

0 comments on commit a12ae39

Please sign in to comment.