Consistent feed sorting

This commit is contained in:
Lucidiot 2021-03-17 15:14:02 +01:00
parent 5ca0ab5648
commit f4f4179261
Signed by: lucidiot
GPG Key ID: 3358C1CA6906FB8D
1 changed files with 8 additions and 2 deletions

View File

@ -77,7 +77,9 @@
<strong>Feed</strong>
</td>
<td>
<xsl:apply-templates select="itsb:feed" />
<xsl:apply-templates select="itsb:feed">
<xsl:sort select="@format" />
</xsl:apply-templates>
</td>
</tr>
</xsl:when>
@ -90,6 +92,8 @@
<table>
<tbody>
<xsl:for-each select="itsb:feed[generate-id(.) = generate-id(key('feedKey', concat(../@id, ' ', @lang, ' ', @type)))]">
<xsl:sort select="@lang" />
<xsl:sort select="@type" />
<xsl:variable name="lang" select="@lang" />
<xsl:variable name="type" select="@type" />
@ -103,7 +107,9 @@
</td>
<td>
<xsl:apply-templates select="../itsb:feed[(@lang = $lang or (not(@lang) and not ($lang))) and (@type = $type or (not(@type) and not($type)))]" />
<xsl:apply-templates select="../itsb:feed[(@lang = $lang or (not(@lang) and not ($lang))) and (@type = $type or (not(@type) and not($type)))]">
<xsl:sort select="@format" />
</xsl:apply-templates>
</td>
</tr>
</xsl:for-each>