﻿<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:template match="/">
	<xsl:apply-templates/>
	</xsl:template> 

		<xsl:template match="rss">
		<html xml:lang="ja" lang="ja">
		<head>
		<title><xsl:value-of select="//title"/>の更新情報</title>
		<meta http-equiv="Content-Style-Type" conent="text/css"/>
		<link rel="stylesheet" href="rss.css" type="text/css" />
		</head>
		<body>
		<h1><a><xsl:attribute name="href"><xsl:value-of select="//link"/></xsl:attribute><xsl:value-of select="//title"/></a>の更新情報</h1>
		<p>この文書は、<a><xsl:attribute name="href"><xsl:value-of select="//link"/></xsl:attribute><xsl:value-of select="//title"/></a> の RSS2.0 を XSLT で変換して表示しています。</p>
		<dl>
		<dt>最終更新日：</dt>
		<dd><xsl:value-of select="//lastBuildDate"/></dd>
		</dl>
		<xsl:apply-templates select="channel/item"/>
		</body>
		</html>
		</xsl:template>

	<xsl:template match="item">
		<div class="section">
		<h2><xsl:value-of select="pubDate"/></h2>
		<dl>
		<dt>カテゴリ：</dt>
		<dd><xsl:value-of select="category"/></dd>
		</dl>
		<h3><a><xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute>
			<xsl:value-of select="title"/></a></h3>
		<p><xsl:value-of select="description"/></p>
		</div>
	</xsl:template>
</xsl:stylesheet>