<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<!--
  <xsl:output method="xml"
    version="1.0"
    encoding="utf-8"
    indent="yes"/>
-->
  <xsl:template match="/opml">
	<xsl:apply-templates select="body" />
  </xsl:template>

  <xsl:template match="body">
    <html>
	<head>
	<title>adammathes.com RSS subscriptions</title>
	</head>	
      <body>
        <h1>adammathes.com subscriptions</h1>
	<p>RSS/ATOM/XML/WHTVRML supernews inputs</p>
	<p>(from <a href="opml.xml">opml source</a>, through <a href="opml.xsl">xsl</a>)</p>
          <ul>
            <xsl:apply-templates select="outline[@title='Subscriptions']/outline" />
          </ul>
      </body>
    </html>
  </xsl:template>

 <xsl:template match="outline">

<xsl:choose>
<xsl:when test="@htmlUrl">
    <li>
      <a href="{@htmlUrl}"><xsl:value-of select="@title"/></a><xsl:text> | </xsl:text><a href="{@xmlUrl}">XML</a>
    </li>
</xsl:when>

<xsl:otherwise>
	<li><ul>
		<xsl:value-of select="@title" />
		<xsl:apply-templates match="./outline" />
	</ul>
	</li>
</xsl:otherwise>

</xsl:choose>

  </xsl:template>

</xsl:stylesheet>
