- add support for Errata Notices RSS Feed
Reviewed by: keramida, hrs
This commit is contained in:
parent
70acbcab38
commit
afc0efa9c2
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=32312
5 changed files with 151 additions and 3 deletions
12
en/index.xsl
12
en/index.xsl
|
@ -4,7 +4,7 @@
|
|||
<!ENTITY title "The FreeBSD Project">
|
||||
]>
|
||||
|
||||
<!-- $FreeBSD: www/en/index.xsl,v 1.162 2008/01/10 08:03:38 murray Exp $ -->
|
||||
<!-- $FreeBSD: www/en/index.xsl,v 1.163 2008/02/27 22:09:31 bmah Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:import href="http://www.FreeBSD.org/XML/www/lang/share/sgml/libcommon.xsl"/>
|
||||
|
@ -310,6 +310,16 @@
|
|||
<xsl:with-param name="type" select="'notice'" />
|
||||
</xsl:call-template>
|
||||
|
||||
<div>
|
||||
<ul class="newseventslist">
|
||||
<li class="first-child">
|
||||
<a href="&base;/security/" title="More Errata Notices">More</a>
|
||||
</li>
|
||||
<li class="last-child">
|
||||
<a href="&base;/security/errata.xml" title="Errata Notices RSS Feed"><img class="rssimage" src="&base;/layout/images/ico_rss.png" width="27" height="12" alt="Errata Notices RSS Feed" /></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div> <!-- unnamed -->
|
||||
</div> <!-- newseventswrap -->
|
||||
|
||||
</div> <!-- FRONTSECURITYCONTENT -->
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $FreeBSD: www/en/security/Makefile,v 1.15 2008/01/10 04:23:39 murray Exp $
|
||||
# $FreeBSD: www/en/security/Makefile,v 1.16 2008/03/01 01:55:27 simon Exp $
|
||||
|
||||
.if exists(../Makefile.conf)
|
||||
.include "../Makefile.conf"
|
||||
|
@ -19,6 +19,7 @@ INDEXLINK= security.html
|
|||
security.html: advisories.html.inc advisories.rdf
|
||||
|
||||
DEPENDSET.DEFAULT= advisories
|
||||
DEPENDSET.errata-rss= notices
|
||||
XML.DEFAULT= ${XML_ADVISORIES}
|
||||
|
||||
XMLDOCS= advisories:mkindex.xsl::advisories.html.inc
|
||||
|
@ -27,5 +28,6 @@ NO_TIDY.advisories= yes
|
|||
|
||||
XMLDOCS+= advisories-rdf:security-rdf.xsl::advisories.rdf
|
||||
XMLDOCS+= advisories-rss:security-rss.xsl::rss.xml
|
||||
XMLDOCS+= errata-rss:errata-rss.xsl::errata.xml
|
||||
|
||||
.include "${WEB_PREFIX}/share/mk/web.site.mk"
|
||||
|
|
26
en/security/errata-rss.xsl
Normal file
26
en/security/errata-rss.xsl
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/xslt10-freebsd.dtd" [
|
||||
<!ENTITY base ".">
|
||||
<!ENTITY title "">
|
||||
]>
|
||||
<!-- $FreeBSD$ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:cvs="http://www.FreeBSD.org/XML/CVS"
|
||||
exclude-result-prefixes="cvs">
|
||||
|
||||
<xsl:import href="http://www.FreeBSD.org/XML/www/lang/share/sgml/libcommon.xsl"/>
|
||||
|
||||
<xsl:output method="xml" indent="yes"/>
|
||||
|
||||
<xsl:variable name="date">
|
||||
<xsl:value-of select="//cvs:keyword[@name='freebsd']"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:call-template name="rss-errata-notices">
|
||||
<xsl:with-param name="notices.xml" select="$notices.xml" />
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
26
en/security/errata.rss
Normal file
26
en/security/errata.rss
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/xslt10-freebsd.dtd" [
|
||||
<!ENTITY base ".">
|
||||
<!ENTITY title "">
|
||||
]>
|
||||
<!-- $FreeBSD$ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:cvs="http://www.FreeBSD.org/XML/CVS"
|
||||
exclude-result-prefixes="cvs">
|
||||
|
||||
<xsl:import href="http://www.FreeBSD.org/XML/www/lang/share/sgml/libcommon.xsl"/>
|
||||
|
||||
<xsl:output method="xml" indent="yes"/>
|
||||
|
||||
<xsl:variable name="date">
|
||||
<xsl:value-of select="//cvs:keyword[@name='freebsd']"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:call-template name="rss-errata-notices">
|
||||
<xsl:with-param name="notices.xml" select="$notices.xml" />
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -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.20 2008/04/20 22:49:25 murray Exp $ -->
|
||||
<!-- $FreeBSD: www/share/sgml/libcommon.xsl,v 1.21 2008/04/21 01:21:41 murray Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0"
|
||||
|
@ -61,6 +61,10 @@
|
|||
rss-security-advisories-title security/security-rss.xsl (for l10n)
|
||||
rss-security-advisories-items security/security-rss.xsl
|
||||
|
||||
rss-errata-notices security/errata-rss.xsl
|
||||
rss-errata-notices-title security/errata-rss.xsl (for l10n)
|
||||
rss-errata-notices-items security/errata-rss.xsl
|
||||
|
||||
html-index-advisories-items index.xsl
|
||||
html-index-advisories-items-lastmodified index.xsl (for i10n)
|
||||
html-index-news-project-items index.xsl
|
||||
|
@ -1067,6 +1071,86 @@
|
|||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<!-- template: "rss-errata-notices"
|
||||
generate a rdf of 10 most recent errata notices -->
|
||||
|
||||
<xsl:template name="rss-errata-notices">
|
||||
<xsl:param name="notices.xml" select="''" />
|
||||
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<xsl:call-template name="rss-errata-notices-title">
|
||||
<xsl:with-param name="notices.xml" select="$notices.xml" />
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="rss-errata-notices-items">
|
||||
<xsl:with-param name="notices.xml" select="$notices.xml" />
|
||||
</xsl:call-template>
|
||||
</channel>
|
||||
</rss>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<!-- template: "rss-errata-notices-title"
|
||||
pulls in the 10 most recent errata notices -->
|
||||
|
||||
<xsl:template name="rss-errata-notices-title"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<xsl:param name="notices.xml" select="''" />
|
||||
|
||||
<xsl:variable name="title">FreeBSD Errata Norices</xsl:variable>
|
||||
<xsl:variable name="link">http://www.FreeBSD.org/security/</xsl:variable>
|
||||
|
||||
<title><xsl:value-of select="$title" /></title>
|
||||
<link><xsl:value-of select="$link" /></link>
|
||||
<description>Errata notices published from the FreeBSD Project</description>
|
||||
<language>en-us</language>
|
||||
<webMaster>secteam@FreeBSD.org (FreeBSD Security Team)</webMaster>
|
||||
<managingEditor>secteam@FreeBSD.org (FreeBSD Security Team)</managingEditor>
|
||||
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
|
||||
<ttl>120</ttl>
|
||||
<image>
|
||||
<url>http://www.FreeBSD.org/logo/logo-full.png</url>
|
||||
<title><xsl:value-of select="$title" /></title>
|
||||
<link><xsl:value-of select="$link" /></link>
|
||||
</image>
|
||||
<atom:link rel="self" type="application/rss+xml">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="$link" /><xsl:text>rss.xml</xsl:text>
|
||||
</xsl:attribute>
|
||||
</atom:link>
|
||||
</xsl:template>
|
||||
|
||||
<!-- template: "rss-errata-notices-items"
|
||||
pulls in the 10 most recent errata notices -->
|
||||
|
||||
<xsl:template name="rss-errata-notices-items"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<xsl:param name="notices.xml" select="''" />
|
||||
|
||||
<xsl:for-each select="document($notices.xml)/descendant::notice[position() <= 10]">
|
||||
<item>
|
||||
<title><xsl:value-of select="name"/></title>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@omithref = 'yes'">
|
||||
<link>http://www.FreeBSD.org/security</link>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<link><xsl:value-of select="concat('&ftpbase;', name, '.asc')" /></link>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<guid><xsl:value-of select="concat('&ftpbase;', name, '.asc')" /></guid>
|
||||
<pubDate>
|
||||
<xsl:call-template name="misc-format-date-string">
|
||||
<xsl:with-param name="year" select="../../../name" />
|
||||
<xsl:with-param name="month" select="../../name" />
|
||||
<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>
|
||||
</xsl:template>
|
||||
|
||||
<!-- template: "html-index-news-project-items"
|
||||
pulls in the 5 most recent project items -->
|
||||
|
||||
|
|
Loading…
Reference in a new issue