2001-08-06 08:58:32 +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"
|
|
|
|
"http://www.FreeBSD.org/XML/www/share/sgml/xslt10-freebsd.dtd" [
|
|
|
|
<!ENTITY title "FreeBSD News Flash RDF">
|
|
|
|
<!ENTITY email "freebsd-www">
|
|
|
|
]>
|
2001-08-06 08:58:32 +02:00
|
|
|
|
2009-06-04 16:08:12 +02:00
|
|
|
<!-- $FreeBSD: www/share/sgml/templates.news-rdf.xsl,v 1.3 2009/06/02 17:33:09 gabor Exp $ -->
|
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
|
|
|
|
2006-08-19 23:20:54 +02:00
|
|
|
<xsl:import href="http://www.FreeBSD.org/XML/www/lang/share/sgml/libcommon.xsl"/>
|
|
|
|
|
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
|
|
|
|
2005-03-10 15:40:34 +01:00
|
|
|
<xsl:variable name="date">
|
|
|
|
<xsl:value-of select="//cvs:keyword[@name='freebsd']"/>
|
|
|
|
</xsl:variable>
|
2001-09-19 15:31:48 +02:00
|
|
|
|
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>
|
|
|
|
<link>http://www.FreeBSD.org/news/</link>
|
|
|
|
<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>
|
|
|
|
<xsl:text>http://www.FreeBSD.org/news/newsflash.html#</xsl:text>
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<xsl:template match="name | date"/>
|
|
|
|
</xsl:stylesheet>
|