2012-09-22 22:09:08 +02:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1" ?>
|
2006-08-19 23:20:54 +02:00
|
|
|
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN"
|
2013-11-13 07:10:37 +01:00
|
|
|
"http://www.FreeBSD.org/XML/share/xml/xslt10-freebsd.dtd">
|
2001-08-06 08:58:32 +02:00
|
|
|
|
2012-05-17 21:12:14 +02:00
|
|
|
<!-- $FreeBSD$ -->
|
2001-08-06 08:58:32 +02:00
|
|
|
|
2005-03-10 15:40:34 +01:00
|
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
|
|
|
xmlns:cvs="http://www.FreeBSD.org/XML/CVS">
|
2001-08-06 08:58:32 +02:00
|
|
|
|
2013-11-13 07:10:37 +01:00
|
|
|
<xsl:import href="http://www.FreeBSD.org/XML/lang/share/xml/libcommon.xsl"/>
|
2012-08-21 21:16:02 +02:00
|
|
|
|
2009-06-04 16:08:12 +02:00
|
|
|
<xsl:output method="xml" indent="yes" encoding="&xml.encoding;"/>
|
2001-08-06 08:58:32 +02:00
|
|
|
|
|
|
|
<!-- Generate the main body of the RDF file -->
|
|
|
|
<xsl:template match="news">
|
2003-08-15 19:35:42 +02:00
|
|
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
|
|
xmlns="http://my.netscape.com/rdf/simple/0.9/">
|
2001-08-06 08:58:32 +02:00
|
|
|
|
|
|
|
<channel>
|
|
|
|
<title>FreeBSD Project News</title>
|
2017-09-29 12:05:20 +02:00
|
|
|
<link>https://www.FreeBSD.org/news/</link>
|
2001-08-06 08:58:32 +02:00
|
|
|
<description>News from the FreeBSD Project</description>
|
|
|
|
</channel>
|
|
|
|
|
|
|
|
<!-- Only include the last 10 events -->
|
|
|
|
<xsl:apply-templates select="descendant::event[position() <= 10]"/>
|
|
|
|
|
2003-08-15 19:35:42 +02:00
|
|
|
</rdf:RDF>
|
2001-08-06 08:58:32 +02:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- Generate the <item> elements and their content -->
|
2004-05-25 03:18:44 +02:00
|
|
|
<xsl:template match="event" xmlns="http://my.netscape.com/rdf/simple/0.9/">
|
2005-03-10 15:40:34 +01:00
|
|
|
<xsl:param name="year" select="../../../name" />
|
|
|
|
<xsl:param name="month" select="../../name" />
|
|
|
|
<xsl:param name="day" select="../name" />
|
|
|
|
<xsl:param name="this" select="." />
|
|
|
|
<xsl:param name="pos">
|
|
|
|
<xsl:for-each select="../event">
|
|
|
|
<xsl:if test=". = $this">
|
|
|
|
<xsl:value-of select="position()" />
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:for-each>
|
|
|
|
</xsl:param>
|
|
|
|
|
2001-08-06 08:58:32 +02:00
|
|
|
<item>
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="count(child::title)">
|
2001-11-07 16:53:47 +01:00
|
|
|
<title><xsl:value-of select="normalize-space(title)"/></title>
|
2001-08-06 08:58:32 +02:00
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
2001-11-07 16:53:47 +01:00
|
|
|
<title><xsl:value-of select="normalize-space(p)"/></title>
|
2001-08-06 08:58:32 +02:00
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
2005-03-10 15:40:34 +01:00
|
|
|
<link>
|
2017-09-29 12:05:20 +02:00
|
|
|
<xsl:text>https://www.FreeBSD.org/news/newsflash.html#</xsl:text>
|
2005-03-10 15:40:34 +01:00
|
|
|
<xsl:call-template name="html-news-generate-anchor">
|
|
|
|
<xsl:with-param name="label" select="'event'" />
|
|
|
|
<xsl:with-param name="year" select="$year" />
|
|
|
|
<xsl:with-param name="month" select="$month" />
|
|
|
|
<xsl:with-param name="day" select="$day" />
|
|
|
|
<xsl:with-param name="pos" select="$pos" />
|
|
|
|
</xsl:call-template>
|
|
|
|
</link>
|
2001-08-06 08:58:32 +02:00
|
|
|
</item>
|
|
|
|
</xsl:template>
|
2012-08-21 21:16:02 +02:00
|
|
|
|
2001-08-06 08:58:32 +02:00
|
|
|
<xsl:template match="name | date"/>
|
|
|
|
</xsl:stylesheet>
|