<?xml version="1.0" encoding="Shift_JIS" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/e-stat">

	<html>
		<head>
			<style type="text/css">
			
				<!--以下、各種フォントサイズ・カラー・種類の定義-->
				body { margin-top:10px; margin-left:20px ; font-family:"ＭＳ ゴシック", sans-serif; }		/* 余白・フォント種類の設定 */
				
				h1 { font-size:medium; line-height:0; color:#0099ff;
					 font-weight: bold; }																	/* 統計結果の公表予定日情報のフォント設定*/
				h2 { font-size:medium; line-height:1.6; color:#0099ff;
					 font-weight: bold; margin-bottom:0em; margin-top:1em; }								/* 統計調査名のフォント設定*/
				h3 { font-size:small; line-height:1.6; color:#000099;
					 font-weight: bold; margin-bottom:0em; margin-top:0em;margin-left:1em; }				/* 公表予定：年月日 のフォント設定*/
				h4 { font-size:x-small; line-height:1.6; background-color:#ccffff; color:#000000;
					 font-weight: bold; margin-bottom:0em; margin-top:0em; margin-left:0em; }				/* 詳細情報の各タイトルのフォント設定 */

				h5 { font-size:x-small; line-height:1.6; background-color:#ffffff; color:#000000;
					 font-weight:normal; margin-bottom:0em; margin-top:0em; margin-left:2em; }				/* outlineのフォント設定 */
				h6 { font-size:x-small; line-height:1.6; background-color:#ffffff; color:#000000;
					 font-weight:normal; margin-bottom:0em; margin-top:0em; margin-left:2em; }				/* noteのフォント設定 */
					 				
				<!--以下、表基本情報の定義-->
				table { width:100%; word-break: break-all;
						 font-size:small; line-height:1.6; color: #000000; }									/* 表サイズ及び分類1~5のフォント設定 */
						 
				.textFrame { font-size:x-small; line-height:1.6; background-color: #0099ff; color: #ffffff;
							 font-weight: bold ;  text-align: center; }										/* 表項目部分の設定 */


				
				<!--以下、各種ラインの定義-->
				.headerLine1 { color:#ff9900; height:2px }		/* ライン1の設定 */
				.headerLine2 { color:#ff9900; height:1px }		/* ライン2の設定 */
				
			
				<!--以下、詳細情報表示部分のリスト定義-->
				dl	{ margin:0em }															/* 詳細情報のリスト　余白設定 */
	
				dt	{ font-size:x-small; line-height:1.6; color:#6699ff;
					  font-weight:bold; margin-bottom:0em; margin-left:1em; float:left; }	/* 詳細情報のリスト　タイトル部分設定 */
					
				dd	{ font-size:x-small; line-height:1.6; color:#000000;
					  margin-bottom:0em; margin-left:12em; }								/* 詳細情報のリスト　情報部分設定 */
					
								
			</style>
		</head>

		<body>
			<title>統計結果の公表情報</title>
			<hr class="headerLine1"></hr>
			<hr class="headerLine2"></hr>
			<h1>統計結果の公表情報</h1>
			<hr class="headerLine2"></hr>
			<hr class="headerLine1"></hr>


			<xsl:for-each select="os_code">
				<h2>【<xsl:value-of select="@name" />】</h2>
				<h5><xsl:value-of select="outline" /></h5>
				
				<div align="right">
				<xsl:if test="update_year != '' or update_month != '' or update_day != '' ">更新日：</xsl:if>
				<xsl:if test="update_year != ''">平成<xsl:value-of select="number(update_year)-1988" />年</xsl:if>
				<xsl:if test="update_month != ''"><xsl:value-of select="update_month" />月</xsl:if>
				<xsl:if test="update_day != ''"><xsl:value-of select="update_day" />日</xsl:if>
				</div>
				


				<table border="1">
					<xsl:choose>
						<xsl:when test="@count_number = 0">
							<th width="0%"></th>
							<th width="0%"></th>
							<th width="0%"></th>
							<th width="0%"></th>
							<th width="0%"></th>
							<th width="100%"></th>
							<xsl:apply-templates select="class_1/class_2/class_3/class_4/class_5/release_year"/>
						</xsl:when>
						<xsl:when test="@count_number = 1">
							<th width="50%"></th>
							<th width="0%"></th>
							<th width="0%"></th>
							<th width="0%"></th>
							<th width="0%"></th>
							<th width="50%"></th>
							<xsl:apply-templates select="class_1/class_2/class_3/class_4/class_5/release_year"/>
						</xsl:when>
						<xsl:when test="@count_number = 2">
							<th width="25%"></th>
							<th width="25%"></th>
							<th width="0%"></th>
							<th width="0%"></th>
							<th width="0%"></th>
							<th width="50%"></th>
							<xsl:apply-templates select="class_1/class_2/class_3/class_4/class_5/release_year"/>
						</xsl:when>
						<xsl:when test="@count_number = 3">
							<th width="18%"></th>
							<th width="16%"></th>
							<th width="16%"></th>
							<th width="0%"></th>
							<th width="0%"></th>
							<th width="50%"></th>
							<xsl:apply-templates select="class_1/class_2/class_3/class_4/class_5/release_year"/>
						</xsl:when>
						<xsl:when test="@count_number = 4">
							<th width="13%"></th>
							<th width="13%"></th>
							<th width="12%"></th>
							<th width="12%"></th>
							<th width="0"></th>
							<th width="50%"></th>
							<xsl:apply-templates select="class_1/class_2/class_3/class_4/class_5/release_year"/>
						</xsl:when>
						<xsl:when test="@count_number = 5">
							<th width="10%"></th>
							<th width="10%"></th>
							<th width="10%"></th>
							<th width="10%"></th>
							<th width="10%"></th>
							<th width="50%"></th>
							<xsl:apply-templates select="class_1/class_2/class_3/class_4/class_5/release_year"/>					
						</xsl:when>
					</xsl:choose>
				</table><br/>
			</xsl:for-each>
		</body>
	</html>
</xsl:template>




<xsl:template match="class_1/class_2/class_3/class_4/class_5/release_year">

	<tr>
		<xsl:if test="../../../../../@name != '' ">



			<xsl:if test="not (../../../../preceding-sibling::class_2) and not (../../../preceding-sibling::class_3) and not (../../preceding-sibling::class_4) and not (../preceding-sibling::class_5) and not (preceding-sibling::release_year)">
				<xsl:element name="td">

					<xsl:attribute name="rowspan">
						<xsl:value-of select="count(../../../../../*/*/*/*/release_year)" />
					</xsl:attribute> 
					<xsl:attribute name="valign">top</xsl:attribute>

					<xsl:if test="../../../../@name = ''">
						<xsl:attribute name="colspan">
							<xsl:value-of select="5" />
						</xsl:attribute> 
						<xsl:attribute name="align">left</xsl:attribute>
					</xsl:if>

					<xsl:value-of select="../../../../../@name"/>

				</xsl:element>
			</xsl:if>



			<xsl:if test="../../../../@name != '' ">
				<xsl:if test="not (../../../preceding-sibling::class_3) and not (../../preceding-sibling::class_4) and not (../preceding-sibling::class_5) and not (preceding-sibling::release_year)">
					<xsl:element name="td">

					<xsl:attribute name="rowspan">
							<xsl:value-of select="count(../../../../*/*/*/release_year)" />
						</xsl:attribute> 
						<xsl:attribute name="valign">top</xsl:attribute>
						
						<xsl:if test="../../../@name = ''">
							<xsl:attribute name="colspan">
								<xsl:value-of select="4" />
							</xsl:attribute> 
							<xsl:attribute name="align">left</xsl:attribute>
						</xsl:if>

						<xsl:value-of select="../../../../@name"/>

					</xsl:element>
				</xsl:if>
			</xsl:if>



			<xsl:if test="../../../@name != '' ">
				<xsl:if test="not (../../preceding-sibling::class_4) and not(../preceding-sibling::class_5) and not (preceding-sibling::release_year)">
					<xsl:element name="td">

						<xsl:attribute name="rowspan">
							<xsl:value-of select="count(../../../*/*/release_year)" />
						</xsl:attribute> 
						<xsl:attribute name="valign">top</xsl:attribute>	

						<xsl:if test="../../@name = ''">
							<xsl:attribute name="colspan">
								<xsl:value-of select="3" />
							</xsl:attribute> 
							<xsl:attribute name="align">left</xsl:attribute>
						</xsl:if>

						<xsl:value-of select="../../../@name" />

					</xsl:element>
				</xsl:if>
			</xsl:if>



			<xsl:if test="../../@name != '' ">
				<xsl:if test="not (../preceding-sibling::class_5) and not (preceding-sibling::release_year)">
					<xsl:element name="td">

						<xsl:attribute name="rowspan">
							<xsl:value-of select="count(../../*/release_year)" />
						</xsl:attribute> 
						<xsl:attribute name="valign">top</xsl:attribute>	

						<xsl:if test="../@name = ''">
							<xsl:attribute name="colspan">
								<xsl:value-of select="2" />
							</xsl:attribute>
							<xsl:attribute name="align">left</xsl:attribute>
						</xsl:if>

						<xsl:value-of select="../../@name" />

					</xsl:element>
				</xsl:if>
			</xsl:if>



			<xsl:if test="../@name != ''">
				<xsl:if test="not (preceding-sibling::release_year)">
					<xsl:element name="td">

						<xsl:attribute name="rowspan">
							<xsl:value-of select="count(../release_year)" />
						</xsl:attribute> 
						<xsl:attribute name="valign">top</xsl:attribute>

						<xsl:value-of select="../@name" />

					</xsl:element>
				</xsl:if>
			</xsl:if>





			<td>
				<xsl:comment>公表予定情報の記述</xsl:comment>
				<h3>公表日：　　平成<xsl:value-of select="number(.)-1988" />年
				
					<xsl:if test="following-sibling::release_month = '1'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '2'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '3'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '4'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '5'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '6'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '7'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '8'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '9'">&#160;</xsl:if>
					<xsl:value-of select="following-sibling::release_month" />月
					
					<xsl:if test="following-sibling::release_day != ''">
					<xsl:if test="following-sibling::release_day = '1'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '2'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '3'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '4'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '5'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '6'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '7'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '8'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '9'">&#160;</xsl:if>
					<xsl:value-of select="following-sibling::release_day" />
					
					<xsl:if test="following-sibling::release_day != '上旬' and following-sibling::release_day != '中旬' and following-sibling::release_day != '下旬' and following-sibling::release_day != '末' and following-sibling::release_day != '頃' ">日

                                        <xsl:if test="following-sibling::release_hour != ''">
                                        <xsl:if test="following-sibling::release_hour = '8'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_hour = '9'">&#160;</xsl:if>
                                        
					<xsl:value-of select="following-sibling::release_hour" />時
                                        <xsl:if test="following-sibling::release_minute = '0'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '1'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '2'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '3'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '4'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '5'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '6'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '7'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '8'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '9'">0</xsl:if>
					<xsl:value-of select="following-sibling::release_minute" />分


　　　                                              </xsl:if>
						</xsl:if>
					</xsl:if>
				</h3>

				<xsl:if test="following-sibling::kokuji_number != '' or following-sibling::kokuji_year != '' or following-sibling::kokuji_month != '' or following-sibling::kokuji_day != '' or following-sibling::internet_url != '' or following-sibling::internet_year != '' or following-sibling::internet_month != '' or following-sibling::internet_day != '' or following-sibling::publication_name != '' or following-sibling::publication_year != '' or following-sibling::publication_month != '' or following-sibling::publication_day != '' or following-sibling::viewing_place != '' or following-sibling::viewing_period != ''">	
					<br />
				</xsl:if>
							
				<xsl:if test="following-sibling::kokuji_number != '' or following-sibling::kokuji_year != '' or following-sibling::kokuji_month != '' or following-sibling::kokuji_day != ''">								
					<h4>官報情報</h4>
				</xsl:if>
				
				<dl>
					<xsl:if test="following-sibling::kokuji_number != ''">
						<dt>官報告示号</dt>
						<dd>
							<xsl:value-of select="following-sibling::kokuji_number" />
						</dd>
					</xsl:if>

					<xsl:if test="following-sibling::kokuji_year != '' or following-sibling::kokuji_month != '' or following-sibling::kokuji_day != ''">								
						<dt>官報告示年月日</dt>
					</xsl:if>

					<dd>
						<xsl:if test="following-sibling::kokuji_year != ''">
							平成<xsl:value-of select="number(following-sibling::kokuji_year)-1988" />年
						</xsl:if>

						<xsl:if test="following-sibling::kokuji_month != ''">
							<xsl:value-of select="following-sibling::kokuji_month" />月
						</xsl:if>

						<xsl:if test="following-sibling::kokuji_day != ''">
							<xsl:value-of select="following-sibling::kokuji_day" />
							<xsl:if test="following-sibling::kokuji_day != '上旬' and following-sibling::kokuji_day != '中旬' and following-sibling::kokuji_day != '下旬' and following-sibling::kokuji_day != '末' and following-sibling::kokuji_day != '頃'">
								日
							</xsl:if>
						</xsl:if>
					</dd>
				</dl>


				<xsl:if test="following-sibling::internet_url != '' or following-sibling::internet_year != '' or following-sibling::internet_month != '' or following-sibling::internet_day != ''">								
					<h4>インターネット情報</h4>
				</xsl:if>
				
				<dl>
					<xsl:if test="following-sibling::internet_url != ''">
						<dt>URL</dt>
						<dd>
							<A><xsl:attribute name="href"><xsl:value-of select="following-sibling::internet_url" /></xsl:attribute><xsl:value-of select="following-sibling::internet_url" /></A>
						</dd>
					</xsl:if>

					<xsl:if test="following-sibling::internet_year != '' or following-sibling::internet_month != '' or following-sibling::internet_day != ''">		
						<dt>掲載年月日</dt>
					</xsl:if>

					<dd>
						<xsl:if test="following-sibling::internet_year != ''">
							平成<xsl:value-of select="number(following-sibling::internet_year)-1988" />年
						</xsl:if>

						<xsl:if test="following-sibling::internet_month != ''">
							<xsl:value-of select="following-sibling::internet_month" />月
						</xsl:if>

						<xsl:if test="following-sibling::internet_day != ''">
							<xsl:value-of select="following-sibling::internet_day" />
							<xsl:if test="following-sibling::internet_day != '上旬' and following-sibling::internet_day != '中旬' and following-sibling::internet_day != '下旬' and following-sibling::internet_day != '末' and following-sibling::internet_day != '頃'">
								日
							</xsl:if>
						</xsl:if>
					</dd>
				</dl>


				<xsl:if test="following-sibling::publication_name != '' or following-sibling::publication_year != '' or following-sibling::publication_month != '' or following-sibling::publication_day != ''">		
					<h4>刊行物情報</h4>
				</xsl:if>
				
				<dl>
					<xsl:if test="following-sibling::publication_name != ''">
						<dt>刊行物名</dt>
						<dd>
							<xsl:value-of select="following-sibling::publication_name" />
						</dd>
					</xsl:if>
				
				
					<xsl:if test="following-sibling::publication_year != '' or following-sibling::publication_month != '' or following-sibling::publication_day != ''">	
						<dt>刊行物発行年月日</dt>
					</xsl:if>

					<dd>
						<xsl:if test="following-sibling::publication_year != ''">
							平成<xsl:value-of select="number(following-sibling::publication_year)-1988" />年
						</xsl:if>

						<xsl:if test="following-sibling::publication_month != ''">
							<xsl:value-of select="following-sibling::publication_month" />月
						</xsl:if>

						<xsl:if test="following-sibling::publication_day != ''">
							<xsl:value-of select="following-sibling::publication_day" />
							<xsl:if test="following-sibling::publication_day != '上旬' and following-sibling::publication_day != '中旬' and following-sibling::publication_day != '下旬' and following-sibling::publication_day != '末' and following-sibling::publication_day != '頃'">
								日
							</xsl:if>
						</xsl:if>
					</dd>
				</dl>


				<xsl:if test="following-sibling::viewing_place != '' or following-sibling::viewing_period != ''">
					<h4>閲覧情報</h4>
				</xsl:if>
				
				<dl>
					<xsl:if test="following-sibling::viewing_place != ''">
						<dt>閲覧場所</dt>
						<dd>
							<xsl:value-of select="following-sibling::viewing_place" />
						</dd>
					</xsl:if>

					<xsl:if test="following-sibling::viewing_period != ''">
						<dt>閲覧期間</dt>
						<dd>	
							<xsl:value-of select="following-sibling::viewing_period" />
						</dd>		
					</xsl:if>
				</dl>
				
				<xsl:if test="following-sibling::note != ''">
					<h4>備考</h4>
					<h6>
						<xsl:value-of select="following-sibling::note" />
					</h6>
				</xsl:if>
			</td>
		</xsl:if>


		<xsl:if test="../../../../../@name = '' ">
			<xsl:element name="td">
				<xsl:attribute name="colspan">
					<xsl:value-of select="6" />
				</xsl:attribute> 
				<xsl:attribute name="align">left</xsl:attribute>



				<h3>公表日：　　平成<xsl:value-of select="number(.)-1988" />年
					<xsl:if test="following-sibling::release_month = '1'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '2'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '3'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '4'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '5'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '6'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '7'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '8'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_month = '9'">&#160;</xsl:if>
					<xsl:value-of select="following-sibling::release_month" />月
					
					<xsl:if test="following-sibling::release_day != ''">
					<xsl:if test="following-sibling::release_day = '1'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '2'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '3'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '4'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '5'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '6'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '7'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '8'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_day = '9'">&#160;</xsl:if>
					<xsl:value-of select="following-sibling::release_day" />
					<xsl:if test="following-sibling::release_day != '上旬' and following-sibling::release_day != '中旬' and following-sibling::release_day != '下旬' and following-sibling::release_day != '末' and following-sibling::release_day != '頃' ">日

                                        <xsl:if test="following-sibling::release_hour != ''">
                                        <xsl:if test="following-sibling::release_hour = '8'">&#160;</xsl:if>
                                        <xsl:if test="following-sibling::release_hour = '9'">&#160;</xsl:if>

					<xsl:value-of select="following-sibling::release_hour" />時
                                        <xsl:if test="following-sibling::release_minute = '0'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '1'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '2'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '3'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '4'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '5'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '6'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '7'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '8'">0</xsl:if>
                                        <xsl:if test="following-sibling::release_minute = '9'">0</xsl:if>
					<xsl:value-of select="following-sibling::release_minute" />分


　　　                                              </xsl:if>
						</xsl:if>
					</xsl:if>
				</h3>
				
				<xsl:if test="following-sibling::kokuji_number != '' or following-sibling::kokuji_year != '' or following-sibling::kokuji_month != '' or following-sibling::kokuji_day != '' or following-sibling::internet_url != '' or following-sibling::internet_year != '' or following-sibling::internet_month != '' or following-sibling::internet_day != '' or following-sibling::publication_name != '' or following-sibling::publication_year != '' or following-sibling::publication_month != '' or following-sibling::publication_day != '' or following-sibling::viewing_place != '' or following-sibling::viewing_period != ''">	
					<br />
				</xsl:if>
				
				<xsl:if test="following-sibling::kokuji_number != ''or following-sibling::kokuji_year != '' or following-sibling::kokuji_month != '' or following-sibling::kokuji_day != ''">					
					<h4>官報情報</h4>
				</xsl:if>

				<dl>
					<xsl:if test="following-sibling::kokuji_number != ''">
						<dt>官報告示番号</dt>
						<dd>
							<xsl:value-of select="following-sibling::kokuji_number" />
						</dd>
					</xsl:if>

					<xsl:if test="following-sibling::kokuji_year != '' or following-sibling::kokuji_month != '' or following-sibling::kokuji_day != ''">								
						<dt>官報告示年月日</dt>
					</xsl:if>

					<dd>
						<xsl:if test="following-sibling::kokuji_year != ''">
							平成<xsl:value-of select="number(following-sibling::kokuji_year)-1988" />年
						</xsl:if>

						<xsl:if test="following-sibling::kokuji_month != ''">
							<xsl:value-of select="following-sibling::kokuji_month" />月
						</xsl:if>

						<xsl:if test="following-sibling::kokuji_day != ''">
							<xsl:value-of select="following-sibling::kokuji_day" />
							<xsl:if test="following-sibling::kokuji_day != '上旬' and following-sibling::kokuji_day != '中旬' and following-sibling::kokuji_day != '下旬' and following-sibling::kokuji_day != '末' and following-sibling::kokuji_day != '頃'">
								日
							</xsl:if>
						</xsl:if>
					</dd>
				</dl>


				<xsl:if test="following-sibling::internet_url != '' or following-sibling::internet_year != '' or following-sibling::internet_month != '' or following-sibling::internet_day != ''">								
					<h4>インターネット情報</h4>
				</xsl:if>

				<dl>
					<xsl:if test="following-sibling::internet_url != ''">
						<dt>URL</dt>
						<dd>
							<A><xsl:attribute name="href"><xsl:value-of select="following-sibling::internet_url" /></xsl:attribute><xsl:value-of select="following-sibling::internet_url" /></A>
						</dd>
					</xsl:if>

					<xsl:if test="following-sibling::internet_year != '' or following-sibling::internet_month != '' or following-sibling::internet_day != ''">		
						<dt>掲載年月日</dt>
					</xsl:if>
				
					<dd>
						<xsl:if test="following-sibling::internet_year != ''">
							平成<xsl:value-of select="number(following-sibling::internet_year)-1988" />年
						</xsl:if>

						<xsl:if test="following-sibling::internet_month != ''">
							<xsl:value-of select="following-sibling::internet_month" />月
						</xsl:if>

						<xsl:if test="following-sibling::internet_day != ''">
							<xsl:value-of select="following-sibling::internet_day" />
							<xsl:if test="following-sibling::internet_day != '上旬' and following-sibling::internet_day != '中旬' and following-sibling::internet_day != '下旬' and following-sibling::internet_day != '末' and following-sibling::internet_day != '頃'">
								日
							</xsl:if>
						</xsl:if>
					</dd>
				</dl>


				<xsl:if test="following-sibling::publication_name != '' or following-sibling::publication_year != '' or following-sibling::publication_month != '' or following-sibling::publication_day != ''">		
					<h4>刊行物情報</h4>
				</xsl:if>

				<dl>
					<xsl:if test="following-sibling::publication_name != ''">
						<dt>刊行物名</dt>
						<dd>
							<xsl:value-of select="following-sibling::publication_name" />
						</dd>
					</xsl:if>

					<xsl:if test="following-sibling::publication_year != '' or following-sibling::publication_month != '' or following-sibling::publication_day != ''">	
						<dt>刊行物発行年月日</dt>
					</xsl:if>
					
					<dd>
						<xsl:if test="following-sibling::publication_year != ''">
							平成<xsl:value-of select="number(following-sibling::publication_year)-1988" />年
						</xsl:if>

						<xsl:if test="following-sibling::publication_month != ''">
							<xsl:value-of select="following-sibling::publication_month" />月
						</xsl:if>

						<xsl:if test="following-sibling::publication_day != ''">
							<xsl:value-of select="following-sibling::publication_day" />
							<xsl:if test="following-sibling::publication_day != '上旬' and following-sibling::publication_day != '中旬' and following-sibling::publication_day != '下旬' and following-sibling::publication_day != '末' and following-sibling::publication_day != '頃'">
								日
							</xsl:if>
						</xsl:if>
					</dd>
				</dl>



				<xsl:if test="following-sibling::viewing_place != '' or following-sibling::viewing_period != ''">
					<h4>閲覧情報</h4>
				</xsl:if>

				<dl>
					<xsl:if test="following-sibling::viewing_place != ''">
						<dt>閲覧場所</dt>
						<dd>
							<xsl:value-of select="following-sibling::viewing_place" />
						</dd>
					</xsl:if>

					<xsl:if test="following-sibling::viewing_period != ''">
						<dt>閲覧期間</dt>
						<dd>
							<xsl:value-of select="following-sibling::viewing_period" />
						</dd>	
					</xsl:if>
				</dl>
				<xsl:if test="following-sibling::note != ''">
					<h4>備考</h4>
					<h6>
						<xsl:value-of select="following-sibling::note" />
					</h6>
				</xsl:if>
			</xsl:element>

		</xsl:if>

	</tr>

</xsl:template>

</xsl:stylesheet>

