<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:x="http://www.w3.org/1999/xhtml"
	version="1.0">
<xsl:namespace-alias result-prefix="x" stylesheet-prefix="#default"/>
<xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" />

<xsl:param name="server-name"></xsl:param>
<xsl:param name="context-path"></xsl:param>
<xsl:param name="path-info"></xsl:param>

<!-- ******************************************************************** -->
<xsl:template match="x:head">
<xsl:copy>
	<xsl:copy-of select="@*[local-name()!='space']" />
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
	<meta http-equiv="Content-Style-Type" content="text/css"/>
	<meta http-equiv="Content-Script-Type" content="text/javascript"/>
	<link rel="shortcut icon" href="{$context-path}/fig/icon.gif" />
	<link rel="stylesheet" type="text/css" charset="UTF-8" href="{$context-path}/style/koiroha-org.css" />
	<xsl:apply-templates select="node()" />
	<script type="text/javascript" src="{$context-path}/script/script.js" charset="UTF-8"><xsl:comment>;</xsl:comment></script>
</xsl:copy>
</xsl:template>

<!-- ******************************************************************** -->
<xsl:template match="x:body">
<xsl:copy>
	<xsl:copy-of select="@*[local-name()!='space']" />

<!-- page header -->
<div id="header">
	<img src="{$context-path}/fig/icon.gif" width="32" height="32" alt="[#]" style="margin-right:4px;"/>
	<span style="font-size:48px;">koiroha</span><span style="font-size:18px;">.org . . . . . <img src="{$context-path}/fig/prompt.gif" alt="_"/></span>
</div>
<div id="body">

<!-- breadcrumb link and language variant -->
<table border="0" cellspacing="0" cellpadding="0" style="width:100%;">
<tr>
	<td align="left">
	<div class="breadcrumb">
	<a href="{$context-path}/">koiroha.org</a>
	<xsl:for-each select="/x:html/x:head/x:link[@rel='index']">
	≫ <a href="{@href}"><xsl:value-of select="@title" /></a>
	</xsl:for-each>
	≫ <xsl:value-of select="../x:head/x:title" />
	</div>
	</td>
	<td align="right">
	<div id="vary"><xsl:comment> language variant </xsl:comment></div>
	</td>
</tr>
</table>

<table border="0" cellspacing="0" cellpadding="0" style="width:100%;">
<colgroup />
<colgroup width="120" />
<tr>
	<td>

	<!-- page content -->
	<div id="content">
	<xsl:apply-templates select="node()" />
	</div>

	<!-- previous/next page -->
	<table style="border:0px;margin:6px;padding:0px;width:100%;" class="breadcrumb">
	<tr>
		<td align="left">
		<xsl:for-each select="/x:html/x:head/x:link[@rel='prev']">
			<a href="{@href}">≪<xsl:value-of select="@title"/></a>::PREV
		</xsl:for-each>
		</td>
		<td align="right">
		<xsl:for-each select="/x:html/x:head/x:link[@rel='next']">
			NEXT::<a href="{@href}"><xsl:value-of select="@title"/>≫</a>
		</xsl:for-each>
		</td>
	</tr>
	<tr>
		<td align="center" colspan="2">
		<xsl:for-each select="/x:html/x:head/x:link[@rel='index'][position()=last()]">
			:: <a href="{@href}"><xsl:value-of select="@title"/></a> ::
		</xsl:for-each>
		</td>
	</tr>
	</table>

	</td>
	<td align="right" style="width:120px;">
	<div>
	<script type="text/javascript">
	// <![CDATA[
	google_ad_client = "pub-8642633349190813";
	google_ad_width = 120;
	google_ad_height = 600;
	google_ad_format = "120x600_as";
	google_ad_type = "text_image";
	google_ad_channel ="8465840195";
	google_color_border = "FFFFFF";
	google_color_bg = "FFFFFF";
	google_color_text = "000000";
	google_color_url = "008000";
	// ]]>
	</script>
	<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">;</script>

	<div style="text-align:center;">
		<a href="http://www.java.com/ja/"><img src="{$context-path}/fig/getjava.gif" style="width:88px;height:31px;border:0px;" alt="Sun Java ダウンロードページ"/></a><br/>
		<a href="http://sourceforge.jp/"><img src="http://sourceforge.jp/sflogo.php?group_id=4229&amp;type=1" style="width:96px;height:31px;border:0px;" alt="SourceForge.JP" /></a><br/>
		<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml11-blue" alt="Valid XHTML 1.1" height="31" width="88" /></a>
	</div>

	</div>
	</td>
</tr>
</table>
</div>
<div id="footer">
	<div style="float:right;">
	:: <a href="{$context-path}/admin/edit.jsp?path={$path-info}">EDIT</a> ::
	<xsl:value-of select="substring(/x:html/x:head/x:meta[@name='cvs-date']/@content,10,8)" />
	</div>
	<address>
	Copyright (C) takami torao :: all rights reserved.
	<img src="{$context-path}/fig/mail.png" width="87" height="11" alt="mail address" title="Yah, this is image so I don't wanna eat spam, sorry!" style="vertical-align:text-bottom;"/>
	</address>
</div>
</xsl:copy>
</xsl:template>

<!-- ******************************************************************** -->
<xsl:template match="x:title">
<title><xsl:apply-templates select="node()" /><xsl:if test="/x:html/x:head/x:link[@rel='index']/@title"> // <xsl:value-of select="/x:html/x:head/x:link[@rel='index'][position()=last()]/@title"/></xsl:if></title>
</xsl:template>

<!-- ******************************************************************** -->
<xsl:template match="x:*">
<xsl:copy>
	<xsl:copy-of select="@*[local-name()!='space']" />
	<xsl:apply-templates select="node()" />
</xsl:copy>
</xsl:template>

</xsl:stylesheet>
