Skip to content

Commit

Permalink
merged in latest from dev with manual merge of debian-tei-xsl/debian/…
Browse files Browse the repository at this point in the history
…changelog
  • Loading branch information
sydb committed Jan 25, 2024
2 parents fce0008 + 78f7c86 commit 12bf29c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 13 deletions.
47 changes: 35 additions & 12 deletions common/functions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1124,11 +1124,11 @@ of this software, even if advised of the possibility of such damage.
<xsl:sequence select="tei:makeGloss(.,$langs)"/>
<!-- now the description -->
<!--
Change, 2020-02-10 in response to #418:
Only look at, count, or copy those <desc> elements that do
NOT have a @type of "deprecationInfo". Note that we use
not(@type eq 'dI') because using just @type ne 'dI' does not
include those <desc>s that do not have @type at all.
Change, 2020-02-10 in response to #418:
Only look at, count, or copy those <desc> elements that do
NOT have a @type of "deprecationInfo". Note that we use
not(@type eq 'dI') because using just @type ne 'dI' does not
include those <desc>s that do not have @type at all.
-->
<xsl:choose>
<xsl:when test="not(tei:desc[ not( @type eq 'deprecationInfo' ) ])"> </xsl:when>
Expand Down Expand Up @@ -1234,13 +1234,36 @@ of this software, even if advised of the possibility of such damage.
</doc>
<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: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:variable name="lang" select="tei:generateDocumentationLang($context)[1]"/>
<!--
Coding NOTE: The 4 tests that comprise $test_results currently
use “gt” the value operator rather than ‘>’ the general
operator. This is because we expect that there will ever only
be 1 sibling <gloss> or <desc> that has the same @type and
same @xml:lang. But we might be proven wrong, in which case
perhaps ‘>’ would have been better. (If you change it, change
this comment, too!)
-->
<xsl:variable name="test_results" as="xs:boolean*">
<!-- first test <gloss> children without @type -->
<xsl:sequence select="$context/tei:gloss[ not(@type) ][ @xml:lang eq 'en' ]/@versionDate
gt $context/tei:gloss[ not(@type) ][ @xml:lang eq $lang ]/@versionDate"/>
<!-- second test <desc> children without @type -->
<xsl:sequence select="$context/tei:desc[ not(@type) ][ @xml:lang eq 'en' ]/@versionDate
gt $context/tei:desc[ not(@type) ][ @xml:lang eq $lang ]/@versionDate"/>
<!-- next test <gloss> children with @type -->
<xsl:for-each select="distinct-values( $context/tei:gloss/@type )">
<xsl:sequence select="$context/tei:gloss[ @type eq . ][ @xml:lang eq 'en' ]/@versionDate
gt $context/tei:gloss[ @type eq . ][ @xml:lang eq $lang ]/@versionDate"/>
</xsl:for-each>
<!-- last test <desc> children with @type -->
<xsl:for-each select="distinct-values( $context/tei:desc/@type )">
<xsl:sequence select="$context/tei:desc[ @type eq . ][ @xml:lang eq 'en' ]/@versionDate
gt $context/tei:desc[ @type eq . ][ @xml:lang eq $lang ]/@versionDate"/>
</xsl:for-each>
</xsl:variable>
<!-- if any one of the above is true, then something is amiss, return true. -->
<xsl:sequence select="$test_results = true()"/>
</xsl:function>

<doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
Expand Down
2 changes: 1 addition & 1 deletion debian-tei-xsl/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ tei-xsl (7.57.0a) natty; urgency=low

* new release from upstream

-- TEI <[email protected]> Wed, 29 Nov 2023 16:51:37 -0500
-- TEI <[email protected]> Thu, 04 Jan 2024 14:25:06 -0500

tei-xsl (7.56.0a) natty; urgency=low

Expand Down

0 comments on commit 12bf29c

Please sign in to comment.