3
我是xml和xslt中的新成员。如何将xslt 1.0升级到xslt 2.0?
我使用经典的asp为我的网页编码。我使用Windows平台为我的网页。并在本地计算机ID“localhost/mywebpage”中。
今天我尝试运行使用XSLT 一个XML文件,但我得到错误
msxml3.dll error '80004005'
Keyword xsl:template may not contain xsl:for-each-group.
下面
是我跑的代码
在XML
<Lakes>
<Lake>
<id>1</id>
<Name>Caspian</Name>
<Type>Natyral</Type>
</Lake>
<Lake>
<id>2</id>
<Name>Moreo</Name>
<Type>Glacial</Type>
</Lake>
<Lake>
<id>3</id>
<Name>Sina</Name>
<Type>Artificial</Type>
</Lake>
</Lakes>
在XSLT( XSLT 2.0)
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each-group select="Lakes/Lake" group-by="Type">
<xsl:result-document href="file{position()}.xml">
<Lakes>
<xsl:copy-of select="current-group()"/>
</Lakes>
</xsl:result-document>
</xsl:for-each-group>
</xsl:template>
</xsl:stylesheet>
IM我的ASP页面
<%
'load xml
set xml = server.createobject("microsoft.xmldom")
xml.async = false
xml.load(server.mappath("test.xml"))
'load xsl
set xsl = server.createobject("microsoft.xmldom")
xsl.async = false
xsl.load(server.mappath("test.xsl"))
set xdm= server.createobject("msxml2.domdocument")
xdm.async = false
xdm.loadxml(xml.transformnode(xsl))
xdm.save(server.mappath("test_r.xml"))
%>
西隧我需要升级我的xslt1.0到xslt2.0?