<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/posts">
    <!-- post is the root element. title and body are the, um, title and body -->
    <post>
    <title>Links for <xsl:value-of select="@dt" /></title>
    <body><ul><xsl:apply-templates select="post"/></ul>
    <a>
      <xsl:attribute name="href">http://del.icio.us/<xsl:value-of select="@user"/></xsl:attribute>
      <img src="http://del.icio.us/img/delicious.gif" style="border-width: 0px"/>
    </a>
    </body>
    </post>
  </xsl:template>
  <xsl:template match="post">
    <li>
      <a>
        <xsl:attribute name="href">
          <xsl:value-of select="@href"/>
        </xsl:attribute>
        <xsl:value-of select="@description" /></a><br />
        <xsl:if test="@extended">
          <xsl:value-of select="@extended" /><br />
        </xsl:if>
      Tags: <xsl:apply-templates select="tag"/>
      (<xsl:value-of select="@time" />)
    </li>
  </xsl:template>
  <xsl:template match="tag">
    <a>
        <xsl:attribute name="href">http://del.icio.us/<xsl:value-of select="/posts/@user"/>/<xsl:value-of select="."/></xsl:attribute>
      <xsl:value-of select="."/> 
    </a>,  
  </xsl:template>
</xsl:stylesheet>