J
Jackyxiao
Unregistered / Unconfirmed
GUEST, unregistred user!
我的机器安装了msxml4.0 用xslt解析一个xml串时显示不出来,在其它机器上都没有问题,
急需高手指点!
小弟在这里谢过了!
hello.xsl
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/hello-world">
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<H1><xsl:value-of select="greeting"/></H1>
<xsl:apply-templates select="greeter"/>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="greeter">
<DIV>from
<I><xsl:value-of select=".text()"/></I>
</DIV>
</xsl:template>
</xsl:stylesheet>
hello.xml
<?xml version="1.0" encoding="gb2312"?>
<?xml-stylesheet type="text/xsl" href="hello.xsl"?>
<hello-world>
<greeter>An XSLT Programmer</greeter>
<greeting>Hello, World!</greeting>
</hello-world>
急需高手指点!
小弟在这里谢过了!
hello.xsl
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/hello-world">
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<H1><xsl:value-of select="greeting"/></H1>
<xsl:apply-templates select="greeter"/>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="greeter">
<DIV>from
<I><xsl:value-of select=".text()"/></I>
</DIV>
</xsl:template>
</xsl:stylesheet>
hello.xml
<?xml version="1.0" encoding="gb2312"?>
<?xml-stylesheet type="text/xsl" href="hello.xsl"?>
<hello-world>
<greeter>An XSLT Programmer</greeter>
<greeting>Hello, World!</greeting>
</hello-world>