OPML to Blog Roll XSLT Transformation
I got frustrated trying to keep up with my blog roll, so I decided to write a chunk of xslt to create one on the fly. This no-frills code snippet will generate a HTML fragment in the following format:
href="http://www.dotnetweblogs.com/dbrowning">.NET Brain Droppings
One will be generated for each entry in your opml file (categories are skipped).
Hope this helps everyone keep thier blog roll current! =)
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" standalone="no" omit-xml-declaration="yes" />
<xsl:template match="/">
<xsl:apply-templates select="//outline" />
< SPAN></xsl:template>
<xsl:template match="outline">
<xsl:choose>
<xsl:when test="@type='rss'">
<a href="{@htmlUrl}"><xsl:value-of select="@title" />< SPAN>a><br/>
< SPAN>xsl:when>
< SPAN>xsl:choose>
< SPAN></xsl:template>
< SPAN></xsl:stylesheet>The permalink to this code snippet can be found here.
[Listening To: 38 - Revco]