问题描述
<?xml:stylesheettype="text/xsl"href="book1.xsl"?><!--以下是有关图书的信息,用xml文档将它们列出-->-<booklibrary>-<book><title>数字图象处理</title><author>陈秋琦</author><publisher>电子工业出版社</publisher><pricemoneytype="RMB">49.00</price></book>-<book><title>C++Buidler开发技术</title><author>李东</author><author>王宏</author><publisher>中国水利水电出版社</publisher><pricemoneytype="RMB">40.00</price></book>-<book><title>VC++编程技术</title><author>高强</author><publisher>人民邮电出版社</publisher><pricemoneytype="RMB">35.00</price></book>-<book><title>ASP.NET课程设计案例精编</title><author>郝思嘉</author><publisher>中国水利水电出版社</publisher><pricemoneytype="RMB">30.00</price></book></booklibrary>为什么会这样显示了我给了他一个样式表啊(.xsl)<?xmlversion="1.0"encoding="gb2312"?><?xml:stylesheettype="text/xsl"href="book1.xsl"?><!DOCTYPEbooklibrary[<!ELEMENTbooklibrary(book*)><!ELEMENTbook(title,author,publisher,price)><!ELEMENTtitle(#PCDATA)><!ELEMENTauthor(#PCDATA)><!ELEMENTpublisher(#PCDATA)><!ELEMENTprice(#PCDATA)>]><!--以下是有关图书的信息,用xml文档将它们列出--><booklibrary><book><title>数字图象处理</title><author>陈秋琦</author><publisher>电子工业出版社</publisher><pricemoneytype="RMB">49.00</price></book><book><title>C++Buidler开发技术</title><author>李东</author><author>王宏</author><publisher>中国水利水电出版社</publisher><pricemoneytype="RMB">40.00</price></book><book><title>VC++编程技术</title><author>高强</author><publisher>人民邮电出版社</publisher><pricemoneytype="RMB">35.00</price></book><book><title>ASP.NET课程设计案例精编</title><author>郝思嘉</author><publisher>中国水利水电出版社</publisher><pricemoneytype="RMB">30.00</price></book></booklibrary><?xmlversion="1.0"encoding="2312"?><xsl:stylesheetxmlns:xsl="http://www.w3.org/TR/WD-xsl"><xsl:templatematch="/"><html><book><h2align="center">图书信息列表<hr><hr></h2><tablecolspan="8"cellpadding="5"border="0"><tr><tdalign="middle"width="150"bgcolor="#4682b4"><fontcolor="#ffffff"size="2"face="黑体">书名</font></td><tdalign="middle"width="150"bgcolor="#4682b4"><fontcolor="#ffffff"size="2"face="黑体">作者</font></td><tdalign="middle"width="150"bgcolor="#4682b4"><fontcolor="#ffffff"size="2"face="黑体">出版社</font></td><tdalign="middle"width="150"bgcolor="#4682b4"><fontcolor="#ffffff"size="2"face="黑体">价格</font></td></tr><xsl:for-eachselect="booklibrary/book"><tr><tdbgcolor="#f7efde"align="middle"><fontsize="2"><xsl:value-ofselect="title"/></font></td><tdbgcolor="#f7efde"align="middle"><fontsize="2"><xsl:value-ofselect="author"/></font></td><tdbgcolor="#f7efde"align="middle"><fontsize="2"><xsl:value-ofselect="publisher"/></font></td><tdbgcolor="#f7efde"align="middle"><fontsize="2"><xsl:value-ofselect="price"/></font></td></tr></xsl:for-each></table></book></html><xsl:template></xsl:stylesheet>
解决方案
解决方案二:
该回复于2009-03-31 14:03:24被版主删除