<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
    <xsl:output method="xml" indent="yes" omit-xml-declaration="yes" /> 
    
    <xsl:template match="/">
        <ul class="categories">
            <xsl:apply-templates select="/opml/body/outline" />        
        </ul>
    </xsl:template>
    
    <xsl:template match="/opml/body/outline"> 
        <li>
            <xsl:value-of select="@text" />
            <ul>
                <xsl:apply-templates select="outline">
                    <xsl:sort select='translate(@title,"ABCDEFGHIJKLMNMOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")' />
                </xsl:apply-templates>
            </ul>
        </li>
    </xsl:template>

    <xsl:template match="/opml/body/outline/outline">
        <li><a>
            <xsl:attribute name='href'><xsl:value-of select='@htmlUrl'/></xsl:attribute>
            <xsl:value-of select='@title' />
            </a></li>
    </xsl:template>    
    
</xsl:stylesheet>