MSIE VS Mozilla VS Opera - Part2

このエントリーをはてなブックマークに追加
51 :名無しさん@お腹いっぱい。:
>>50
条件は分かりませんが以下のコードでIEだとテーブルが表示されるのに、
Mozillaだとテーブルが出来ずに全てつながって1行で表示されてしまいます。

test.xml
<?xml version="1.0" encoding="Shift_JIS"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>

<書庫>
<本>
<名前>ZZZ</名前>
<出版社>(株)ABC</出版社>
<内容>普通</内容>
<発売日>2001/05/14</発売日>
</本>
<本>
<名前>AAA</名前>
<出版社>(有)DEF</出版社>
<内容>粗悪</内容>
<発売日>2001/08/08</発売日>
</本>
</書庫>

test.xsl
<?xml version="1.0" encoding="Shift_JIS"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml1/strict">

<xsl:template match="/">
<html>
<head><title>テスト</title></head>
<body>
<xsl:apply-templates/>
</body></html>
</xsl:template>

<xsl:template match="書庫">
<table border="1">
<tr>
<th>名前</th>
<th>出版社</th>
<th>内容</th>
<th>発売日</th>
</tr>

<xsl:for-each select="本">
<tr>
<td><xsl:value-of select="名前"/></td>
<td><xsl:value-of select="出版社"/></td>
<td><xsl:value-of select="内容"/></td>
<td><xsl:value-of select="発売日"/></td>
</tr>
</xsl:for-each>

</table>
</xsl:template>

</xsl:stylesheet>