<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:ldWeather="http://weather.livedoor.com/ns/rss/2.0"
  xmlns:gglcalfunc="http://www.magicvox.net/pub/xmlns/gglcal"
>
<xsl:output method="html"/>



<!-- Root Document -->
<xsl:template match="/">
  <div id="gglcal">
    <xsl:apply-templates select="rss"/>
  </div><!--gglcal-->
</xsl:template><!--/-->



<!-- rss -->
<xsl:template match="rss">
  <a href="{channel/link}">
  <h1><xsl:value-of select="channel/title"/></h1></a>

  <h2><xsl:value-of select="channel/description"/></h2>

  <p class="header">
    <xsl:text>Last updated at </xsl:text>
    <span class="date"><xsl:value-of select="channel/lastBuildDate"/></span><!--date-->
  </p><!--header-->

  <p class="header">
    <xsl:text>Published by </xsl:text>
    <span class="name"><xsl:value-of select="channel/author"/></span><!--name-->
  </p><!--header-->

  <div class="items">
    <xsl:apply-templates select="channel/item"/>
  </div><!--items-->

  <p class="header">
    <a href="{gglcalfunc:getPermalink ()}"><img src="./image/icon_link.gif"/>このページのリンク</a>
    <a href="{gglcalfunc:reload ()}"><img src="./image/action_refresh.gif"/>再読込み</a>
  </p><!--header-->

  <p class="powered">
    <xsl:text>Powered by </xsl:text>
    <a href="{channel/generator}"><xsl:value-of select="channel/author"/></a>
  </p><!--powered-->

  <p class="powered">
    <xsl:text>Powered by </xsl:text>
    <a href="http://www.magicvox.net/archive/2006/05231645.php">Open MagicVox.net</a>
  </p><!--powered-->

  <table cellspacing="0" cellpadding="0" class="pagectrl"><tr>
    <td class="center">
      <a href="http://lab.magicvox.net/gglcal/">livedoor Weather by ぐぐるかる beta</a>
    </td><!--center-->
  </tr></table><!--pagectrl-->
</xsl:template><!--rss-->



<xsl:template match="channel/item">
  <xsl:if test="1 &lt; position()">
  <div class="item" id="{generate-id(.)}">
    <h1><xsl:value-of select="title"/></h1>
    <img src="{image/url}" align="left" width="{image/width}" height="{image/height}" alt="{image/title}"/>
    <xsl:value-of select="description"/>
    <br clear="all"/>
  </div><!--item-->
  </xsl:if>
</xsl:template><!--channel/item-->

</xsl:stylesheet>
