1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 08:45:04 -05:00

Make XEP superseded more visible in HTML output

When a XEP has been superseded (or supersedes something else) it's not
always immediately obvious in the HTML output. It exists at the bottom
of the page in the appendices, but this requires a lot of digging, and
in the status message, but this is a big red blob of text that we don't
expect to differ from XEP to XEP and is harder to parse through than the
information we want being in a table.

This adds the information to a third place, the table in the header to
make it more obvious.
This commit is contained in:
Sam Whited 2022-02-18 10:11:41 -05:00
parent 17f235c3da
commit bea4abe07c
No known key found for this signature in database
GPG Key ID: 16D5138E52B849B3

22
xep.xsl
View File

@ -271,6 +271,28 @@ content: "XEP-<xsl:value-of select='/xep/header/number'/>";
<xsl:with-param name='thetype' select='/xep/header/type'/>
</xsl:call-template>
</dd>
<xsl:variable name='supersedes.count' select='count(/xep/header/supersedes/spec)'/>
<xsl:choose>
<xsl:when test='$supersedes.count &gt; 0'>
<dt>Supersedes</dt>
<dd>
<xsl:apply-templates select='/xep/header/supersedes/spec'>
<xsl:with-param name='speccount' select='$supersedes.count'/>
</xsl:apply-templates>
</dd>
</xsl:when>
</xsl:choose>
<xsl:variable name='supersededby.count' select='count(/xep/header/supersededby/spec)'/>
<xsl:choose>
<xsl:when test='$supersededby.count &gt; 0'>
<dt>Superseded By</dt>
<dd>
<xsl:apply-templates select='/xep/header/supersededby/spec'>
<xsl:with-param name='speccount' select='$supersededby.count'/>
</xsl:apply-templates>
</dd>
</xsl:when>
</xsl:choose>
<dt>Type</dt>
<dd><xsl:value-of select='/xep/header/type'/></dd>
<dt>Version</dt>