<?xml version="1.0" encoding="Shift_JIS" ?>
<xsl:stylesheet
	version="1.0"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:bld="http://www.ylum.gr.jp/2001/bld"
>
<xsl:output
	method="html"
	version="3.2"
	media-type="text/html"
	omit-xml-declaration="no"
	encoding="Shift_JIS"
	indent="no"
/>

<!-- インデックスファイルを取り込む -->
<xsl:variable name="index" select="document('../index.xml')"/>
<!-- URLs リストの XML ファイルを取り込む -->
<xsl:variable name="URLs" select="document('../URLs.xml')"/>

<xsl:template match="/bld:BOOKS">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"/>
<title><xsl:value-of select="concat('イリューム伯爵城館 - プロフィール - 所有書籍 - ',@title)"/></title>
</head>

<body>
<h1><xsl:value-of select="@title"/></h1>
<xsl:apply-templates select="bld:GENRE|bld:POCKET-BOOK|bld:COMIC" />

</body>

</html>
</xsl:template>
<!-- メイン終了 -->

<!-- ジャンルで別けられていた場合のテンプレート。 -->
<xsl:template match="bld:GENRE">
<h2><xsl:value-of select="@title"/></h2>
<xsl:apply-templates />
</xsl:template>

<!-- 文庫本とコミックのテンプレート。 -->
<xsl:template match="bld:POCKET-BOOK|bld:COMIC">
<h2><xsl:value-of select="@title"/></h2>
<xsl:apply-templates />
</xsl:template>

<!-- 文庫本とコミックの、シリーズ別に別けられていた場合のテンプレート。 -->
<xsl:template match="bld:SERIES">
<h3><xsl:value-of select="@title"/></h3>
<div class="series">
<xsl:apply-templates select="bld:BOOK"/>
</div>
</xsl:template>

<xsl:template match="bld:BOOK">
<p><xsl:apply-templates select="bld:MAIN-TITLE|bld:SUB-TITLE"/></p>
</xsl:template>

<xsl:template match="bld:MAIN-TITLE">
<xsl:value-of select="." />
</xsl:template>

<xsl:template match="bld:SUB-TITLE">
　<xsl:value-of select="." />
</xsl:template>

</xsl:stylesheet>
