Add <pubDate> to each <item> for better RSS reader support.
PR: www/117358
This commit is contained in:
parent
c6345218a0
commit
a9441caef7
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=31298
2 changed files with 34 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
|||
<!ENTITY base ".">
|
||||
<!ENTITY title "">
|
||||
]>
|
||||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/en/java/java-rss.xsl,v 1.1 2008/01/15 21:16:25 murray Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:cvs="http://www.FreeBSD.org/XML/CVS"
|
||||
|
@ -65,6 +65,7 @@
|
|||
<xsl:for-each select="descendant::event[position() <= 10]">
|
||||
<xsl:variable name="guid"><xsl:call-template name="generate-event-anchor"/></xsl:variable>
|
||||
|
||||
<xsl:variable name="month"><xsl:call-template name="generate-month-num"><xsl:with-param name="month" select="../../name"/></xsl:call-template></xsl:variable>
|
||||
<item>
|
||||
<title>
|
||||
<xsl:choose>
|
||||
|
@ -85,6 +86,16 @@
|
|||
|
||||
<link>http://www.FreeBSD.org/java/newsflash.html#<xsl:value-of select="$guid" /></link>
|
||||
<guid>http://www.FreeBSD.org/java/newsflash.html#<xsl:value-of select="$guid" /></guid>
|
||||
|
||||
<pubDate>
|
||||
<xsl:call-template name="misc-format-date-string">
|
||||
<xsl:with-param name="year" select="../../../name" />
|
||||
<xsl:with-param name="month" select="$month" />
|
||||
<xsl:with-param name="day" select="../name" />
|
||||
<xsl:with-param name="date-format" select="$param-l10n-date-format-rfc822" />
|
||||
</xsl:call-template>
|
||||
</pubDate>
|
||||
|
||||
</item>
|
||||
|
||||
</xsl:for-each>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/xslt10-freebsd.dtd">
|
||||
<!-- $FreeBSD: www/share/sgml/libcommon.xsl,v 1.13 2008/01/11 23:36:14 jkois Exp $ -->
|
||||
<!-- $FreeBSD: www/share/sgml/libcommon.xsl,v 1.14 2008/01/16 09:14:18 murray Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0"
|
||||
|
@ -667,6 +667,27 @@
|
|||
<xsl:text>:</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<!-- template: "generate-month-num" -->
|
||||
<xsl:template name="generate-month-num">
|
||||
<xsl:param name="month" />
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$month='January'">1</xsl:when>
|
||||
<xsl:when test="$month='February'">2</xsl:when>
|
||||
<xsl:when test="$month='March'">3</xsl:when>
|
||||
<xsl:when test="$month='April'">4</xsl:when>
|
||||
<xsl:when test="$month='May'">5</xsl:when>
|
||||
<xsl:when test="$month='June'">6</xsl:when>
|
||||
<xsl:when test="$month='July'">7</xsl:when>
|
||||
<xsl:when test="$month='August'">8</xsl:when>
|
||||
<xsl:when test="$month='September'">9</xsl:when>
|
||||
<xsl:when test="$month='October'">10</xsl:when>
|
||||
<xsl:when test="$month='November'">11</xsl:when>
|
||||
<xsl:when test="$month='December'">12</xsl:when>
|
||||
<xsl:otherwise>???</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- template: "html-news-generate-anchor" (for l10n) -->
|
||||
<xsl:template name="html-news-generate-anchor">
|
||||
<xsl:param name="label" />
|
||||
|
|
Loading…
Reference in a new issue