Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: live
Fetching contributors…

Cannot retrieve contributors at this time

82 lines (73 sloc) 3.233 kb
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/>
<xsl:param name="channelLink" select="'http://planet-php.net'"/>
<xsl:param name="channelTitle" select="'Planet PHP'"/>
<xsl:param name="channelDescription" select="'People blogging about PHP'"/>
<xsl:template match="/">
<feed version="0.3" xml:lang="en-GB" xmlns="http://purl.org/atom/ns#">
<title>
<xsl:value-of select="$channelTitle"/>
</title>
<link rel="alternate" type="text/html" href="{$channelLink}"/>
<tagline>
<xsl:value-of select="$channelDescription"/>
</tagline>
<id>
<xsl:value-of select="$channelLink"/>
</id>
<generator url="http://planet-php.net/">
Planet PHP Aggregator
</generator>
<!--<copyright type="text/plain" mode="escaped">All rights reserved, all wrongs reversed. Bring lawyers, guns, and money</copyright>
-->
<modified>
<xsl:value-of select="/planet/entries/entry[1]/date_iso"/>
</modified>
<xsl:apply-templates select="/planet/entries/entry"/>
</feed>
</xsl:template>
<xsl:template match="entries/entry">
<entry>
<title type="text/plain" mode="escaped">
<xsl:value-of select="title"/>
</title>
<link rel="alternate" type="text/html" href="{link}" title="{title}"/>
<author>
<name>
<xsl:choose>
<xsl:when test="string-length(blog_author) &gt; 0 ">
<xsl:value-of select="blog_author"/>
<xsl:if test="blog_dontshowblogtitle = 0"> (<xsl:value-of select="blog_title"/>) </xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="blog_title"/>
</xsl:otherwise>
</xsl:choose>
</name>
</author>
<id>
<xsl:value-of select="link"/>
</id>
<modified> <xsl:value-of select="date_iso"/></modified>
<issued><xsl:value-of select="date_iso"/></issued>
<content type="text/html" mode="escaped">
<xsl:call-template name="description"/>
</content>
</entry>
</xsl:template>
<xsl:template name="description">
<xsl:choose>
<xsl:when test="string-length(content_encoded) > 0">
<xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
<xsl:value-of disable-output-escaping="yes" select="content_encoded"/>
<xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
<xsl:value-of disable-output-escaping="yes" select="description"/>
<xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Jump to Line
Something went wrong with that request. Please try again.