On Sun, 14 Nov 2004 16:48:57 +0100 Nick Wilson <[EMAIL PROTECTED]>
wrote:
hi all,

im all tired out of searching, just cant seem to find a script that will
convert atom 0.3 to any rss format. Does anyone have one or know where i
can get hold of one?

<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; xmlns:atom="http://purl.org/atom/ns#"; xmlns:dc="http://purl.org/dc/elements/1.1/";> <xsl:output cdata-section-elements="description" /> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="atom:[EMAIL PROTECTED]'0.3']"> <xsl:element name="rss"> <xsl:attribute name="version">2.0</xsl:attribute> <xsl:element name="channel"> <xsl:apply-templates select="atom:title"/> <xsl:apply-templates select="atom:[EMAIL PROTECTED]'text/html']/@href"/> <xsl:element name="description"> <xsl:value-of select="atom:tagline"/> </xsl:element> <xsl:apply-templates select="atom:modified"/> <xsl:element name="docs">http://backend.userland.com/rss</xsl:element> <xsl:apply-templates select="atom:entry"/> </xsl:element> </xsl:element> </xsl:template> <xsl:template match="atom:entry"> <xsl:element name="item"> <xsl:apply-templates select="atom:title"/> <xsl:apply-templates select="atom:[EMAIL PROTECTED]'text/html']/@href"/> <xsl:element name="guid"> <xsl:attribute name="isPermaLink">false</xsl:attribute> <xsl:value-of select="atom:id"/> </xsl:element> <xsl:apply-templates select="atom:modified"/> <xsl:element name="description"> <xsl:choose> <xsl:when test="atom:[EMAIL PROTECTED]'escaped']"> <xsl:value-of select="atom:content" disable-output-escaping="yes"/> </xsl:when> <xsl:otherwise> <xsl:copy-of select="atom:content/*"/> </xsl:otherwise> </xsl:choose> </xsl:element> </xsl:element> </xsl:template> <xsl:template match="atom:title"> <xsl:element name="title"> <xsl:value-of select="."/> </xsl:element> </xsl:template> <xsl:template match="atom:[EMAIL PROTECTED]'text/html']/@href"> <xsl:element name="link"> <xsl:value-of select="."/> </xsl:element> </xsl:template> <xsl:template match="atom:modified"> <xsl:element name="dc:date"> <xsl:value-of select="."/> </xsl:element> </xsl:template> </xsl:stylesheet>


-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

http://www.smempire.org

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to