<?xml version="1.0" encoding="shift_jis" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- (c) Sato Kiriumi -->
<xsl:template match="/">
	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
	<head>
	<title>エンチャントスクロールデータ</title>
	<link rel="stylesheet" href="s.css" />
	</head>
	<body>
	<p>
	確認済みのアイテムには「*」が付いています。<br />
	一部データが怪しいものあり。注意...<br />
	データのミスがございましたら、指摘お願いします。<br />
	XML+テーブル+画像でかなーり重くなっております。。<br />
	表示はＤＬしてオフラインで見ても遅いです(´・ω・`)<br />
	データ参考：Mabinogi Wiki*<br />
	画像：一部を除いて自力で手に入れたアイテムのSSより
	</p>
	<table cellspacing="1" cellpadding="0" bgcolor="#000000" align="center">
	<tr><th class="be">名前</th><th class="be">ランク/r</th><th class="be">prefix/<br />suffix</th><th class="be">効果/e</th><th class="be">アイテム</th><th class="be">エンチャ<br />可能場所</th></tr>
	<xsl:apply-templates select="escrolls/scroll" />
	</table>
	</body>
	</html>
</xsl:template>

<xsl:template match="escrolls/scroll">
	<tr><td align="center" bgcolor="#ffffff">
		<xsl:apply-templates select="name1" />
		<xsl:apply-templates select="name" />
	</td><td align="center" bgcolor="#ffffff">
		<xsl:copy-of select="rank" />/<xsl:copy-of select="r" />
	</td><td align="center" bgcolor="#ffffff">
		<xsl:copy-of select="posi" />
	</td><td align="center" bgcolor="#ffffff">
		<xsl:apply-templates select="effect" />
		<xsl:apply-templates select="e" />
		<xsl:apply-templates select="e1" />
		<xsl:apply-templates select="e2" />
		<xsl:apply-templates select="e3" />
		<xsl:apply-templates select="e4" />
		<xsl:apply-templates select="e5" />
		<xsl:apply-templates select="e6" />
	</td><td align="center" bgcolor="#ffffff">
		<xsl:apply-templates select="item" />
	</td><td align="center" bgcolor="#ffffff">
		<xsl:if test="pla=''">
			全体
		</xsl:if>
		<xsl:apply-templates select="pla" />
	</td></tr>
</xsl:template>

<xsl:template match="name1">
	<xsl:choose>
		<xsl:when test="@gazo='1'">
			<img>
				<xsl:attribute name="src">
					./drop/<xsl:value-of select="." />.gif
				</xsl:attribute>
				<xsl:attribute name="alt">
					<xsl:value-of select="." />
				</xsl:attribute>
			</img>
		</xsl:when>
		<xsl:otherwise>
			<xsl:copy-of select="." />
		</xsl:otherwise>
	</xsl:choose>
	<br />
</xsl:template>

<xsl:template match="name">
	<xsl:copy-of select="." />
</xsl:template>

<xsl:template match="effect">
	<font>
		<xsl:attribute name="style">
			color:
			<xsl:choose>
				<xsl:when test="(contains(.,'増加'))or(contains(.,'弱そう'))or(contains(.,'ランクに関係なく'))">
					<xsl:choose>
						<xsl:when test="contains(.,'修理費')">#ff0000</xsl:when>
						<xsl:otherwise>#0000ff</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:choose>
						<xsl:when test="(contains(.,'減少'))and(contains(.,'修理費'))">#0000ff</xsl:when>
						<xsl:otherwise>#ff0000</xsl:otherwise>
					</xsl:choose>
				</xsl:otherwise>
			</xsl:choose>
			;
		</xsl:attribute>
	<xsl:copy-of select="." />
	</font><br />
</xsl:template>

<xsl:template match="e">
	<xsl:copy-of select="." />
</xsl:template>

<xsl:template match="e1">
	/<xsl:copy-of select="." />
</xsl:template>

<xsl:template match="e2">
	/<xsl:copy-of select="." />
</xsl:template>

<xsl:template match="e3">
	/<xsl:copy-of select="." />
</xsl:template>

<xsl:template match="e4">
	/<xsl:copy-of select="." />
</xsl:template>

<xsl:template match="e5">
	/<xsl:copy-of select="." />
</xsl:template>

<xsl:template match="e6">
	/<xsl:copy-of select="." />
</xsl:template>

<xsl:template match="item">
	<xsl:choose>
		<xsl:when test="@no!=''">
			<a target="_blank">
				<xsl:attribute name="href">
					drop.xml#<xsl:value-of select="@no" />
				</xsl:attribute>
				<xsl:choose>
					<xsl:when test="@gazo='1'">
						<img>
							<xsl:attribute name="src">
								./drop/<xsl:value-of select="@no" />.gif
							</xsl:attribute>
							<xsl:attribute name="alt">
								<xsl:value-of select="." />
							</xsl:attribute>
						</img>
					</xsl:when>
					<xsl:otherwise>
						<xsl:copy-of select="." />
					</xsl:otherwise>
				</xsl:choose>
			</a>
		</xsl:when>
		<xsl:otherwise>
			<xsl:copy-of select="." />
		</xsl:otherwise>
	</xsl:choose>
	<br />
</xsl:template>

<xsl:template match="pla">
	<xsl:copy-of select="." /><br />
</xsl:template>

</xsl:stylesheet>
