RSSアカウントのfolders.xmlからOPMLを生成するためのXSLTスクリプトです。適当なXSLTプロセッサ(ここではxsltproc)で、以下のように変換できます。
xsltproc -o opml.xml opml.xsl folders.xml
opml.xslは下のスクリプトです。
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="folders">
<opml version="1.0">
<body>
<xsl:apply-templates select="normalFolder[parent=0]|queryFolder[parent=0]"/>
</body>
</opml>
</xsl:template>
<xsl:template match="normalFolder|queryFolder">
<outline text="{name}" title="{name}">
<xsl:if test="params/param[@name='URL']">
<xsl:attribute name="type">rss</xsl:attribute>
<xsl:attribute name="xmlUrl"><xsl:value-of select="params/param[@name='URL']"/></xsl:attribute>
</xsl:if>
<xsl:apply-templates select="/folders/normalFolder[parent=current()/id]|/folders/queryFolder[parent=current()/id]"/>
</outline>
</xsl:template>
</xsl:stylesheet>