<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
*  $Id: Syndication.xsl,v 1.6 2005/05/12 13:44:34 nzawa Exp nzawa $
*
*  Copyright (c) 2005 Nzawa
*
*  Usage of the works is permitted provided that this instrument
*  is retained with the works, so that any entity that uses the works
*  is notified of this instrument.
*
*  DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 
*
*  [2004, Fair License: rhid.com/fair]
 ====================================================================== -->
<xsl:stylesheet
	version="1.0"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
	exclude-result-prefixes="syn">


<xsl:template mode="ext_metadata" match="syn:updatePeriod">
	<dt>更新頻度</dt>
	<dd>
		<xsl:variable name="period"><xsl:value-of select="."/></xsl:variable>
		<xsl:variable name="frequency"><xsl:value-of select="../syn:updateFrequency"/></xsl:variable>
		<xsl:choose>
			<xsl:when test="$frequency = ''">
				<xsl:text>1回</xsl:text>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$frequency"/><xsl:text>回</xsl:text>
			</xsl:otherwise>
		</xsl:choose>
		<xsl:text> / </xsl:text>
		<xsl:choose>
			<xsl:when test="$period = 'hourly'">
				<xsl:text>時間</xsl:text>
			</xsl:when>
			<xsl:when test="$period = 'daily'">
				<xsl:text>日</xsl:text>
			</xsl:when>
			<xsl:when test="$period = 'weekly'">
				<xsl:text>週</xsl:text>
			</xsl:when>
			<xsl:when test="$period = 'monthly'">
				<xsl:text>月</xsl:text>
			</xsl:when>
			<xsl:when test="$period = 'yearly'">
				<xsl:text>年</xsl:text>
			</xsl:when>
			<xsl:otherwise>
				<xsl:text>日</xsl:text>
			</xsl:otherwise>
		</xsl:choose>
	</dd>
</xsl:template>


</xsl:stylesheet>
