<?xml version="1.0" encoding="EUC-JP"?>

<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="http://www.w3.org/1999/xhtml"
	xmlns:rss="http://purl.org/rss/1.0/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
	>

<xsl:output
	method="xml"
	version="1.0"
	omit-xml-declaration="no"
	doctype-public="-//W3C//DTD XHTML 1.1//EN"
	doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
	indent="yes"
	encoding="EUC-JP"
	media-type="application/xhtml+xml"/>

<xsl:template match="rdf:RDF">
<html xml:lang="ja" lang="ja">
<head>
	<title><xsl:value-of select="rss:channel/rss:title" /> RSS</title>
	<style type="text/css">
body{
	font-family: "ＭＳ Ｐゴシック" ,"ヒラギノ丸ゴ Pro W4" ,"Osaka",verdana ,arial ,sans-serif;
}
a{
	color: #337777;
	text-decoration: none;
}
a:link{
	color: #0000FF;
	text-decoration: none;
}

a:visited{
	color: #000099;
	text-decoration: none;
}
a:active	{ color: #FF0000;  } 
a:hover		{ color: Silver;  background-color : Maroon; }
.icon img {
   float: left;
   margin-right: 15px;
   margin-left: 10px;
}
.title {
   font-size: 200%;
}
p.description {
  padding: 15px;
  margin: 10px;
  border-bottom: 1px solid #ccc;
  border-right: 1px solid #ccc;
  background: #f0f9ff;
  line-height: 140%;
}
.body {
  border-top: 1px dashed #ccc;
}

.items li {
  line-height: 140%;
}
div.right {
  text-align: right;
  font-size: 85%;
  margin-right: 10px;
}

div.footer {
  border-top: 1px dashed #ccc;
}
li	{ margin-top:5px; }
li p	{ display:none; padding: 10px; margin:10px; border:1px dotted gray; background-color:#FFFFCC; }
button	{ height:1.6em;width:1.6em; }
	</style>
	<script type="text/javascript">
function showHide(x){
	var marker = x.parentNode.firstChild.firstChild;
	var para = x.parentNode.getElementsByTagName("p").item(0);
	if(marker.data == "＋"){
		para.style.display ="block"; marker.data = "??";
	}else{
		para.style.display ="none"; marker.data = "＋"; 
	}
}
	</script>
</head>
<body>
	<div class="icon">
		<xsl:if test="boolean(rss:channel/rss:image)=true()">
			<img src="{rss:channel/rss:image/@rdf:resource}" id="logo" alt="{rdf:RDF/rss:channel/rss:title}のロゴ" title="{rss:channel/rss:title}のロゴ" />
		</xsl:if>
	</div>
	<div class="title">
		<xsl:element name="a">
			<xsl:attribute name="href"><xsl:value-of select="rss:channel/rss:link" /></xsl:attribute>
			<xsl:value-of select="rss:channel/rss:title" />
		</xsl:element>
		<xsl:text> </xsl:text><a href="http://ura.mino.net/?RSS">RSS</a>
	</div>
	<div class="right">
		<xsl:value-of select="rss:channel/rss:description" />
	</div>
	<p class="description">
		<xsl:value-of select="rss:channel/rss:title" /> の更新情報である <a href="http://ura.mino.net/?RSS">RSS</a> を XSLT で変換して表示しています。<br />通常は、この <a href="http://ura.mino.net/?RSS">RSS</a> フィードをお使いのRSSリーダに登録して購読されることをオススメします。
	</p>
	<xsl:if test="boolean(image)=false()">
		<div style="clear:both"></div>
	</xsl:if>

	<div class="body">
		<ol>
		<xsl:for-each select="rss:item">
			<li>
				<xsl:if test="boolean(rss:description)=true()">
					<button style="height:1.6em;width:1.6em" title="クリックして概要の表示／非表示を切り替え" onclick="showHide(this)">＋</button>
				</xsl:if>
				<xsl:text> </xsl:text>
				<xsl:element name="a">
					<xsl:attribute name="href"><xsl:value-of select="rss:link"/></xsl:attribute>
					<xsl:value-of select="rss:title" />
				</xsl:element>

				<xsl:if test="boolean(dc:subject)=true()">
					<xsl:text> </xsl:text><xsl:value-of select="dc:subject"/>
				</xsl:if>

				<xsl:text> </xsl:text><xsl:value-of select="dc:date" />

				<xsl:if test="boolean(rss:description)=true()">
					<p><xsl:value-of select="rss:description" /></p>
				</xsl:if>
			</li>
		</xsl:for-each>
		</ol>
		<div class="right"><xsl:value-of select="rss:channel/dc:date"/></div>
	</div>
	<div class="footer">
		<a href="http://mino.net/"><img src="http://mino.net/image/mino_link.gif" border="0" alt="みのねっと" title="みのねっと" width="88" height="31" /></a>
		<a href="http://fcgi.mino.net/"><img src="http://mino.net/cgi/cgi_link.gif" alt="フリーＣＧＩみの" title="フリーＣＧＩみの" border="0" width="88" height="31" /></a>
		<a href="http://mino.net/dog/"><img src="http://mino.net/dog/dog_link.gif" alt="愛犬アルバム" title="愛犬アルバム" border="0" width="88" height="31" /></a>
		<a href="http://fighter.mino.net/"><img src="http://mino.net/image/wan2.gif" alt="闘うわんこ達" title="闘うわんこ達" border="0" height="40" /></a>
	</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

