<?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:rss10="http://purl.org/rss/1.0/"
	xmlns:atom03="http://purl.org/atom/ns#"
	xmlns:atom10="http://www.w3.org/2005/Atom"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:jf="http://www.jivesoftware.com/xmlns/jiveforums/rss"
>

<xsl:output method="html" encoding="utf-8" />
	<xsl:template match="/">
		<ul>
			<xsl:apply-templates select="//rss/channel/item" mode="normal"/>
		</ul><a href="rss.xsl">rss</a>
	</xsl:template>

	<!-- RSS 0.91/0.92/2.0 template -->
	<xsl:template match="//rss/channel/item" mode="normal">
		<xsl:if test="position()&lt;=20">				<xsl:comment>####←記事の件数####</xsl:comment>
			<li> 
				<div class="new_icon">
					<xsl:choose>
                        <xsl:when test="url='http://blog.study.jp/yguk/'">
                            <img src="/univ/blog/images/blog_icon02.gif" alt="学科ブログ" width="85" height="14" />
                        </xsl:when>
                        <xsl:when test="url='http://blog.study.jp/ygun/'">
                            <img src="/univ/blog/images/blog_icon02.gif" alt="学科ブログ" width="85" height="14" />
                        </xsl:when>
                        <xsl:when test="url='http://blog.study.jp/ygusc/'">
                            <img src="/univ/blog/images/blog_icon03.gif" alt="学生支援センターブログ" width="85" height="14" />
                        </xsl:when>
                        <xsl:when test="url='http://blog.study.jp/ygulib/'">
                            <img src="/univ/blog/images/blog_icon04.gif" alt="図書館ブログ" width="85" height="14" />
                        </xsl:when>
                        <xsl:when test="url='http://blog.study.jp/wada/'">
                            <img src="/univ/blog/images/blog_icon05.gif" alt="理事長ブログ" width="85" height="14" />
                        </xsl:when>
                        <xsl:when test="url='http://blog.study.jp/yguyama/'">
                            <img src="/univ/blog/images/blog_icon09.gif" alt="学長ブログ" width="85" height="14" />
                        </xsl:when>
                        <xsl:when test="url='http://blog.study.jp/ygu_gakusai/'">
                            <img src="/univ/blog/images/blog_icon06.gif" alt="大学祭ブログ" width="85" height="14" />
                        </xsl:when>
                        <xsl:when test="url='http://blog.study.jp/ygugp/'">
                            <img src="/univ/blog/images/blog_icon07.gif" alt="GPブログ" width="85" height="14" />
                        </xsl:when>
                        <xsl:when test="url='http://blog.study.jp/ygu-alumni/'">
                            <img src="/univ/blog/images/blog_icon08.gif" alt="同窓会設立ブログ" width="85" height="14" />
                        </xsl:when>
                        <xsl:when test="url='http://blog.study.jp/yguex/'">
                        	<img src="/univ/blog/images/blog_icon10.gif" alt="その他のブログ" width="85" height="14" />
                        </xsl:when>
                        <xsl:otherwise>
                            <img src="/univ/blog/images/blog_icon01.gif" alt="教員ブログ" width="85" height="14" />
                        </xsl:otherwise>
					</xsl:choose>
				</div>
				<p>
					<xsl:element name="a">
						<xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute>
						<xsl:attribute name="rel">external</xsl:attribute>
						<xsl:value-of select="substring(title, 1, 27)" />	<xsl:comment>####←表示文字数####</xsl:comment>
						<xsl:choose>
						    <xsl:when test="string-length(title)&gt;=27">
								...続きを読む					<xsl:comment>####←指定文字数以上の場合####</xsl:comment>
							</xsl:when>
						</xsl:choose>
					</xsl:element>
				</p>
			</li>
		</xsl:if>
	</xsl:template>

</xsl:stylesheet>
