8823ec1d16
git-svn-id: svn://svn.c3d2.de/c3d2-web/branches/toidinamais_coole_scheisse@105 31f61c52-7bfb-0310-b897-fc00f8a278f0
63 lines
2.0 KiB
XML
63 lines
2.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<xsl:stylesheet version="1.0"
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
exclude-result-prefixes="xsl">
|
|
|
|
<xsl:output method="xml"
|
|
version="1.0"
|
|
encoding="utf-8"
|
|
indent="yes"/>
|
|
|
|
<xsl:template match="news">
|
|
<xsl:element name="rss">
|
|
<xsl:attribute name="version">2.0</xsl:attribute>
|
|
<xsl:attribute name="xml:lang">de</xsl:attribute>
|
|
|
|
<channel>
|
|
<title>www.c3d2.de Newsfeed</title>
|
|
<link>https://www.c3d2.de/</link>
|
|
<description>Neues aus dem Chaos Computer Club Dresden</description>
|
|
<language>de-de</language>
|
|
<pubDate><xsl:value-of select="news/item/@date"/></pubDate>
|
|
<xsl:for-each select="newsfile">
|
|
<xsl:apply-templates select="document(current())/item" />
|
|
</xsl:for-each>
|
|
</channel>
|
|
|
|
</xsl:element>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="item">
|
|
<item>
|
|
<title><xsl:value-of select="@title"/></title>
|
|
<description><xsl:apply-templates/></description>
|
|
<author><xsl:value-of select="@author"/></author>
|
|
<category><xsl:value-of select="@category"/></category>
|
|
<pubDate><xsl:value-of select="@date"/></pubDate>
|
|
</item>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="pre">
|
|
<pre><xsl:apply-templates/></pre>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="p">
|
|
<p><xsl:apply-templates/></p>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="image">
|
|
<img src="<xsl:value-of select="."/>"<xsl:if test="@title"> title="<xsl:value-of select="@title"/>" alt="<xsl:value-of select="@title"/>"</xsl:if><xsl:if test="@class"> class="<xsl:value-of select="@class"/>"</xsl:if>/>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="link">
|
|
<a<xsl:choose>
|
|
<xsl:when test="@href">
|
|
href="<xsl:value-of select="@href"/>"
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
href="<xsl:value-of select="."/>"
|
|
</xsl:otherwise>
|
|
</xsl:choose><xsl:apply-templates/>>
|
|
</xsl:template>
|
|
</xsl:stylesheet>
|