<?xml:stylesheet type="text/xsl" href="book1.xsl"?>
<!--以下是有关图书的信息,用xml文档将它们列出-->
-
<booklibrary>
-
<book>
<title>数字图象处理</title>
<author>陈秋琦</author>
<publisher>电子工业出版社</publisher>
<price moneytype="RMB">49.00</price>
</book>
-
<book>
<title>C++Buidler开发技术</title>
<author>李东</author>
<author>王宏</author>
<publisher>中国水利水电出版社</publisher>
<price moneytype="RMB">40.00</price>
</book>
-
<book>
<title>VC++编程技术</title>
<author>高强</author>
<publisher>人民邮电出版社</publisher>
<price moneytype="RMB">35.00</price>
</book>
-
<book>
<title>ASP.NET课程设计案例精编</title>
<author>郝思嘉</author>
<publisher>中国水利水电出版社</publisher>
<price moneytype="RMB">30.00</price>
</book>
</booklibrary>
为什么会这样显示了 我给了他一个样式表 啊 (.xsl
<?xml version="1.0" encoding="gb2312" ?>
<?xml:stylesheet type="text/xsl" href="book1.xsl"?>
<!DOCTYPE booklibrary[
  <!ELEMENT booklibrary (book*)>
  <!ELEMENT book (title,author,publisher,price)>
  <!ELEMENT title (#PCDATA)>
  <!ELEMENT author (#PCDATA)>
  <!ELEMENT publisher (#PCDATA)>
  <!ELEMENT price (#PCDATA)>
]>
<!--以下是有关图书的信息,用xml文档将它们列出-->
<booklibrary>
 <book>
    <title>数字图象处理</title>
    <author>陈秋琦</author>
    <publisher>电子工业出版社</publisher>
    <price moneytype="RMB">49.00</price>
 </book>
 <book>
    <title>C++Buidler开发技术</title>
    <author>李东</author>
    <author>王宏</author>
    <publisher>中国水利水电出版社</publisher>
    <price moneytype="RMB">40.00</price>
 </book>
 <book>
    <title>VC++编程技术</title>
    <author>高强</author>
    <publisher>人民邮电出版社</publisher>
    <price moneytype="RMB">35.00</price>
 </book>
 <book>
    <title>ASP.NET课程设计案例精编</title>
    <author>郝思嘉</author>
    <publisher>中国水利水电出版社</publisher>
    <price moneytype="RMB">30.00</price>
 </book>
</booklibrary>
<?xml version="1.0" encoding="2312" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<book>
<h2 align="center">图书信息列表<hr><hr></h2>
<table colspan="8" cellpadding="5" border="0">
<tr>
<td align="middle" width="150" bgcolor="#4682b4">
  <font color="#ffffff" size="2" face="黑体">书名</font>
</td>
<td align="middle" width="150" bgcolor="#4682b4">
  <font color="#ffffff" size="2" face="黑体">作者</font>
</td>
<td align="middle" width="150" bgcolor="#4682b4">
  <font color="#ffffff" size="2" face="黑体">出版社</font>
</td>
<td align="middle" width="150" bgcolor="#4682b4">
  <font color="#ffffff" size="2" face="黑体">价格</font>
</td>
</tr>
<xsl:for-each select="booklibrary/book">
<tr>
<td bgcolor="#f7efde" align="middle">
 <font size="2"><xsl:value-of select="title"/></font>
</td>
<td bgcolor="#f7efde" align="middle">
 <font size="2"><xsl:value-of select="author"/></font>
</td>
<td bgcolor="#f7efde" align="middle">
 <font size="2"><xsl:value-of select="publisher"/></font>
</td>
<td bgcolor="#f7efde" align="middle">
 <font size="2"><xsl:value-of select="price"/></font>
</td>  
</tr>
</xsl:for-each>
</table>
</book>
</html>
<xsl:template>
</xsl:stylesheet>