A simple XSLT For Atom Feeds

<?xml version=”1.0″?>
<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform&#8221; xmlns:atom=”http://purl.org/atom/ns#&#8221; >
<xsl:output method=”html” indent=”yes” omit-xml-declaration=”yes”/>
<xsl:template match=”atom:feed”>
<html>
<body>
<xsl:for-each select=”atom:entry”>
<p>
<a href=”{atom:link[2]/@href}” target=”_blank”>
<font size=”+1″><b><xsl:value-of select=”atom:link[2]/@title”/></b></font>
</a>
<br/>
<xsl:for-each select=”atom:author”>
By <b>
<xsl:value-of select=”atom:name”/></b>
<br/>
</xsl:for-each>
<br/>
<xsl:if test=”atom:issued”>
Published:
<b><xsl:value-of select=”atom:issued”/></b>
<br/>
</xsl:if><br/>
<xsl:value-of select=”atom:content” disable-output-escaping=”yes”/>
</p>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.