<?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="http://www.w3.org/1999/xhtml"
 xmlns:rss="http://purl.org/rss/1.0/"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 exclude-result-prefixes="rdf rss dc"
>
	<xsl:output method="xml" indent="yes" media-type="application/xhtml+xml" doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd"/>
	<xsl:template match="/">
		<xsl:apply-templates select="rdf:RDF"/>
	</xsl:template>
	<xsl:template match="rdf:RDF">
		<html xml:lang="ja">
			<xsl:apply-templates select="rss:channel"/>
			<body>
				<h1><a><xsl:attribute name="href"><xsl:value-of select="rss:channel/rss:link"/></xsl:attribute><xsl:value-of select="rss:channel/rss:title"/></a><xsl:text>(</xsl:text><abbr title="RDF Site Summary">RSS</abbr><xsl:text>)</xsl:text></h1>
				<h2><xsl:text>概要</xsl:text></h2>
				<p><xsl:value-of select="rss:channel/rss:description"/></p>
				<h2><xsl:text>当サイトのコンテンツ</xsl:text></h2>
				<dl>
					<xsl:apply-templates select="rss:item"/>
				</dl>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="rss:channel">
		<head>
			<title><xsl:value-of select="rss:title"/><xsl:text>(RSS)</xsl:text></title>
		</head>
	</xsl:template>
	<xsl:template match="rss:item">
		<dt><a><xsl:attribute name="href"><xsl:value-of select="@rdf:about"/></xsl:attribute><xsl:value-of select="rss:title"/></a></dt>
		<dd>
			<dl>
				<xsl:apply-templates select="rss:description"/>
				<xsl:apply-templates select="rss:link"/>
				<xsl:apply-templates select="dc:date"/>
				<xsl:apply-templates select="dc:creator"/>
				<xsl:if test="dc:subject">
					<dt><xsl:text>カテゴリ</xsl:text></dt>
					<dd>
						<ul>
							<xsl:apply-templates select="dc:subject"/>
						</ul>
					</dd>
				</xsl:if>
			</dl>
		</dd>
	</xsl:template>
	<xsl:template match="rss:description">
		<dt><xsl:text>概要</xsl:text></dt>
		<dd><p><xsl:value-of select="."/></p></dd>
	</xsl:template>
	<xsl:template match="rss:link">
		<dt><abbr title="Uniform Resource Identifier"><xsl:text>URI</xsl:text></abbr></dt>
		<dd><code><xsl:value-of select="."/></code></dd>
	</xsl:template>
	<xsl:template match="dc:date">
		<dt><xsl:text>更新時刻</xsl:text></dt>
		<dd><code><xsl:value-of select="."/></code></dd>
	</xsl:template>
	<xsl:template match="dc:creator">
		<dt><xsl:text>著作者</xsl:text></dt>
		<dd><xsl:value-of select="."/></dd>
	</xsl:template>
	<xsl:template match="dc:subject">
		<li><xsl:value-of select="."/></li>
	</xsl:template>
</xsl:stylesheet>
