为什么这个xsl不起作用?显示不了数据?
xml内容如下:
<?xml version='1.0'?>
<?xml-stylesheet type="text/xsl" href="tempa.xsl"?>
<comicbook>
<book>
<bookname author="zjx" date="12/14/00">tansuoyuzou</bookname>
</book>
</comicbook>
xsl内容如下:
<?xml version='1.0' encoding='GB2312'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/tr/wd-xsl">
<xsl:template match="/">
<table border='1' style='width:300;'>
<tr><th colspan='3'>new</th></tr>
<tr><th>id</th><th>price</th><th>advance</th></tr>
<tr>
<th><xsl:value-of select="comicbook/book/bookname" /></th>
<th><xsl:value-of select="comicbook/book/bookname/@author" /></th>
<th><xsl:value-of select="comicbook/book/bookname/@date" /></th>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>
问题现在只能显示标题,而不能显示属性值和数据。
这是为什么,谢谢!