以文本方式查看主题 - 中文XML论坛 - 专业的XML技术讨论区 (http://bbs.xml.org.cn/index.asp) -- 『 XSL/XSLT/XSL-FO/CSS 』 (http://bbs.xml.org.cn/list.asp?boardid=8) ---- [原创]求助高手,很急! (http://bbs.xml.org.cn/dispbbs.asp?boardid=8&rootid=&id=74873) |
-- 作者:talzar -- 发布时间:5/14/2009 10:36:00 PM -- [原创]求助高手,很急! 我有一段XML文档和自己写的XSL文档,就是在浏览器中显示不出来,由于我是新手,所以请求高手帮帮忙给弄一下!以下是文档代码: XML文档: <?xml version="1.0" encoding="GBK"?> <?xml-stylesheet type="text/xsl"herf="yangshi.xsl"?> <books> ...... <book TypelD="01" PositionID="1"> <bookname>XML基础教程</bookname> <author>耿祥义</author> <press>清华大学出版社</press> <publishdate>2006年06月</publishdate> <price>38</price> <introduction>计算机类图书</introduction> </book> <book TypelD="02" PositionID="2"> <bookname>网上银行与网上金融服务</bookname> <author>邓顺国</author> <press>北京交通大学出版社</press> <publishdate>2004年09月</publishdate> <price>28</price> <introduction>信息类图书</introduction> </book> ...... </books> XSL文档: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <TABLE width="750" align="center"> <TR> <TD><xsl:apply-templates select="books/book[@PositionID=1]"/></TD> <TD><xsl:apply-templates select="books/book[@PositionID=2]"/></TD> </TR> </TABLE> </xsl:template> <xsl:template match="books/book"> <TD> <TABLE Width="750" align="center"> <TR><TD><B>[书名]<xsl:value-of select="bookname"/></B></TD></TR> <TR><TD>[作者]<xsl:value-of select="author"/></TD></TR> <TR><TD>[出版社]<xsl:value-of select="press"/></TD></TR> <TR><TD>[出版日期]<xsl:value-of select="publishdate"/></TD></TR> <TR><TD>[简介]<xsl:value-of select="introduction"/></TD></TR> <TR><TD>[价格]<xsl:value-of select="price"/></TD></TR> <TR><TD>[书目类别]<xsl:value-of select="introduction"/></TD></TR> </TD> </TABLE> </xsl:template> </xsl:stylesheet> 错在什么地方了,指点一下! |
-- 作者:talzar -- 发布时间:5/14/2009 10:37:00 PM -- 各位大侠高手帮帮忙啊! |
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
46.875ms |