| 1 |
zack |
1743 |
<?xml version="1.0" encoding="utf-8" ?>
|
| 2 |
|
|
<!--
|
| 3 |
|
|
Copyright (C) 2007 Stefano Zacchiroli
|
| 4 |
|
|
|
| 5 |
|
|
This file is distributed under the terms of the General Public License
|
| 6 |
|
|
version 3 or (at your option) any later version.
|
| 7 |
|
|
-->
|
| 8 |
|
|
|
| 9 |
|
|
<xsl:stylesheet version="1.0"
|
| 10 |
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
| 11 |
|
|
xmlns:date="http://exslt.org/dates-and-times"
|
| 12 |
|
|
>
|
| 13 |
|
|
|
| 14 |
|
|
<xsl:param name="package"/> <!-- e.g. "vim" -->
|
| 15 |
|
|
<xsl:param name="hash"/> <!-- e.g. "v", can be like "libv" for libs -->
|
| 16 |
|
|
|
| 17 |
|
|
<xsl:variable name="ptsurl">
|
| 18 |
|
|
<xsl:text>http://packages.qa.debian.org</xsl:text>
|
| 19 |
|
|
</xsl:variable>
|
| 20 |
|
|
|
| 21 |
|
|
<xsl:variable name="baseurl">
|
| 22 |
|
|
<!-- e.g. "http://packages.qa.debian.org/v/vim" -->
|
| 23 |
|
|
<!-- no trailing slash! -->
|
| 24 |
|
|
<xsl:value-of select="$ptsurl" />
|
| 25 |
|
|
<xsl:text>/</xsl:text> <xsl:value-of select="$hash" />
|
| 26 |
|
|
<xsl:text>/</xsl:text> <xsl:value-of select="$package" />
|
| 27 |
|
|
</xsl:variable>
|
| 28 |
|
|
|
| 29 |
|
|
<xsl:variable name="pkgurl">
|
| 30 |
|
|
<!-- e.g. "http://packages.qa.debian.org/v/vim.html" -->
|
| 31 |
|
|
<xsl:value-of select="$baseurl" />
|
| 32 |
|
|
<xsl:text>.html</xsl:text>
|
| 33 |
|
|
</xsl:variable>
|
| 34 |
|
|
|
| 35 |
|
|
<xsl:template match="/">
|
| 36 |
|
|
<xsl:apply-templates select="news/news" />
|
| 37 |
|
|
</xsl:template>
|
| 38 |
|
|
|
| 39 |
|
|
<xsl:template match="news">
|
| 40 |
|
|
<rss version="2.0">
|
| 41 |
|
|
<channel>
|
| 42 |
|
|
<title>
|
| 43 |
|
|
<xsl:text>Debian developer's news for </xsl:text>
|
| 44 |
|
|
<xsl:value-of select="$package" />
|
| 45 |
|
|
</title>
|
| 46 |
|
|
<link>
|
| 47 |
|
|
<xsl:value-of select="$pkgurl" />
|
| 48 |
|
|
</link>
|
| 49 |
|
|
<description>
|
| 50 |
|
|
<xsl:text>Latest developer's news for Debian source package </xsl:text>
|
| 51 |
|
|
<xsl:value-of select="$package" />.
|
| 52 |
|
|
</description>
|
| 53 |
|
|
<language>en-us</language>
|
| 54 |
|
|
<xsl:apply-templates />
|
| 55 |
|
|
</channel>
|
| 56 |
|
|
</rss>
|
| 57 |
|
|
</xsl:template>
|
| 58 |
|
|
|
| 59 |
|
|
<xsl:template match="item">
|
| 60 |
|
|
<item>
|
| 61 |
|
|
<title>
|
| 62 |
|
|
<xsl:value-of select="." />
|
| 63 |
|
|
<xsl:text> (</xsl:text>
|
| 64 |
|
|
<xsl:value-of select="@from" />
|
| 65 |
|
|
<xsl:text>)</xsl:text>
|
| 66 |
|
|
</title>
|
| 67 |
|
|
<xsl:variable name="id">
|
| 68 |
|
|
<xsl:value-of select="$ptsurl" />
|
| 69 |
|
|
<xsl:text>/</xsl:text> <xsl:value-of select="$hash" />
|
| 70 |
|
|
<xsl:text>/</xsl:text> <xsl:value-of select="@url" />
|
| 71 |
|
|
</xsl:variable>
|
| 72 |
|
|
<guid> <xsl:value-of select="$id" /> </guid>
|
| 73 |
|
|
<link> <xsl:value-of select="$id" /> </link>
|
| 74 |
|
|
<description>
|
| 75 |
|
|
<a href="{@url}">
|
| 76 |
|
|
<xsl:value-of select="." />
|
| 77 |
|
|
<xsl:text> (</xsl:text>
|
| 78 |
|
|
<xsl:value-of select="@from" />
|
| 79 |
|
|
<xsl:text>)</xsl:text>
|
| 80 |
|
|
</a>
|
| 81 |
|
|
</description>
|
| 82 |
|
|
</item>
|
| 83 |
|
|
</xsl:template>
|
| 84 |
|
|
|
| 85 |
|
|
</xsl:stylesheet>
|