<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
xmlns:rss="http://purl.org/rss/1.0/" 
xmlns:dc="http://purl.org/dc/elements/1.1/" 
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 
xmlns:content="http://purl.org/rss/1.0/modules/content/"
>
<xsl:output method="html" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" indent="yes" encoding="utf-8" media-type="text/html" />

<xsl:template match="/">

<xsl:variable name="title" select="rdf:RDF/rss:channel/rss:title" />
<xsl:variable name="date" select="rdf:RDF/rss:channel/dc:date" />
<xsl:variable name="link" select="rdf:RDF/rss:channel/rss:link" />
<xsl:variable name="rdfname">index.rdf</xsl:variable>

<xsl:element name="html">
<head>
<title><xsl:value-of select="$title" /> | RSS1.0 Feed</title>
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-script-type" content="text/javascript" />
<link rel="stylesheet" href="/css/rdf.css" type="text/css" />
<link rel="icon" type="image/png" href="/img/favicon.png" />
<link rel="shortcut icon" href="/img/favicon.ico" />
<script type="text/javascript" src="/js/decode.js"></script>
</head>
<body onload="go_decoding();">
<div id="container">
<div id="content">
<div id="check">
<xsl:text disable-output-escaping="yes" >&amp;amp;</xsl:text>
</div>
<p id="navi"><a href="{$link}" title="トップページへ">TOP</a></p>
<div id="head">
<h1>
<a href="{$link}" title="{$title}"><xsl:value-of select="$title" /></a>
</h1>
<p id="feedby">RSS1.0 feed by <xsl:value-of select="$link" /></p>
<div id="manual">
<p>このRSSフィードのURLをRSSリーダーに登録するだけで、簡単に更新状況、最新のエントリーを確認できます。</p>
<p><xsl:value-of select="concat($link,'rss/',$rdfname)" /></p>
<p class="rssreader">
<strong>Get RSS Reader Now!</strong> （オススメRSSリーダー<xsl:text disable-output-escaping="yes" > &amp; </xsl:text>RSSリーダー機能付きブラウザ / メールクライアント）<br />
<a href="http://www.bradsoft.com/feeddemon/" title="Get FeedDemon"><img src="/img/rss/fd-banner.gif" width="140" height="32" alt="Get FeedDemon" /></a> 
<a href="http://getfirefox.jp/" title="Get Firefox"><img src="/img/rss/getfirefox_small.gif" width="110" height="32" alt="Get Firefox" /></a> 
<a href="http://GetThunderbird.jp/" title="Get Thunderbird"><img src="/img/rss/thunderbird_small.gif" width="110" height="32" alt="Get Thunderbird" /></a> 
<a href="http://browser.netscape.com/" title="Netscape NOW!"><img src="/img/rss/netscape.gif" width="160" height="32" alt="Netscape NOW!" /></a>
</p>
<p class="adfeed">
<strong>Web Based RSS Readers</strong> （バナーをクリックするとRSSフィードを登録できます）<br />
<a href="http://e.my.yahoo.co.jp/config/jp_promo_content?.module=jp_rss&amp;.url={concat($link,'rss/',$rdfname)}" title="My Yahoo!にRSSフィードを登録する"><img src="/img/rss/addtomyyahoo4.gif" width="91" height="17" alt="Subscribe with My Yahoo!" /></a> 
<a href="http://fusion.google.com/add?feedurl={concat($link,'rss/',$rdfname)}" title="Add to Google"><img src="/img/rss/google_add.gif" width="104" height="17" alt="Add to Google" /></a> 
<a href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url={concat($link,'rss/',$rdfname)}" title="NewsGator OnlineにRSSフィードを登録する"><img src="/img/rss/ngsub1.gif" width="91" height="17" alt="Subscribe in NewsGator Online"/></a> 
<a href="http://www.bloglines.com/sub/{concat($link,'rss/',$rdfname)}" title="BloglinesにRSSフィードを登録する"><img src="/img/rss/sub_modern1.gif" width="94" height="20" alt="Subscribe with Bloglines" /></a>
</p>
</div>
</div>
<div id="itemhead">
<h2><xsl:value-of select="$title" /> | 最新エントリー15件</h2>
<p>Last Update <xsl:value-of select="substring($date,1,10)" />
<xsl:text> </xsl:text>
<xsl:value-of select="substring($date,12,5)" /></p>
</div>
<div id="item">
<xsl:apply-templates select="rdf:RDF/rss:item" />
</div>
<div id="foot">
Except where otherwise <a href="http://creativecommons.org/policies#license">noted</a>, this site is<br />
licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.1/jp/">Creative Commons License</a>
</div>
</div>
</div>
</body>
</xsl:element>

</xsl:template>

<xsl:template match="rdf:RDF/rss:item">

<xsl:variable name="date" select="dc:date" />
<xsl:variable name="title" select="rss:title" />
<xsl:variable name="link" select="rss:link" />
<xsl:variable name="desc" select="rss:description" />
<xsl:variable name="enco" select="content:encoded" />

<div xmlns="http://www.w3.org/1999/xhtml">
<h3>
<a href="{$link}" title="{$title}"><xsl:value-of select="$title" /></a>
</h3>
<p class="datetime">
<xsl:value-of select="substring($date,1,10)" />
<xsl:text> </xsl:text>
<xsl:value-of select="substring($date,12,5)" />
</p>
<div name="decode" class="items">

<xsl:choose>
<xsl:when test="content:encoded">
<xsl:value-of select="$enco" disable-output-escaping="yes"/></xsl:when>
<xsl:when test="rss:description">
<xsl:value-of select="$desc" disable-output-escaping="yes"/>
</xsl:when>
</xsl:choose>

</div>
</div>

</xsl:template>

</xsl:stylesheet>
