以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 DOM/SAX/XPath 』  (http://bbs.xml.org.cn/list.asp?boardid=11)
----  大家能否帮我看看好吗?就是不显示~!!不知道为什么~~~~  (http://bbs.xml.org.cn/dispbbs.asp?boardid=11&rootid=&id=34141)


--  作者:fxn9801
--  发布时间:6/10/2006 7:12:00 PM

--  大家能否帮我看看好吗?就是不显示~!!不知道为什么~~~~
我的XML是:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="menutotree.xsl"?>
<allmenuinfo>
<menunode id="1" idParent="0" menuName="a" aleave="2" isChild="1" />
<menunode id="2" idParent="1" menuName="b" aleave="2" isChild="1" />
<menunode id="3" idParent="1" menuName="c" aleave="2" isChild="0" />
<menunode id="4" idParent="2" menuName="e" aleave="2" isChild="0" />
</allmenuinfo>

XSL是:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes">
<xsl:output method="xml" encoding="UTF-16"/>
<xsl:template match="/allmenuinfo">
<allmenuinfo>
<xsl:apply-templates select="*[1]"/>
</allmenuinfo>
</xsl:template>
<xsl:template match="*">
<xsl:variable name="id" select="@id"/>
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="/allmenuinfo/menunode[@idParent=$id]"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

为什么运行XML什么都不显示呢?????您能否帮我看看


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
31.250ms