我一直在尝试根据其节点分割多个文件的大型xml文件。 我在互联网上看了一遍,我发现XSLT应该完成这项工作,但是当我尝试这篇文章中描述的例子如何使用XSLT将XML文件拆分成许多XML文件 ,然后在浏览器中访问xml文件时此消息显示up:XSLT转换期间出错:XSLT转换失败。 我错过了什么吗?
I have been trying to split an large xml file by multiple files based on its nodes. I looked all over on internet and i found out that XSLT should do the job, however when i tried the example described in this post How to split XML file into many XML files using XSLT and then accessed the xml file in the browser this message showed up: Error during XSLT transformation: XSLT transformation failed. Am i missing something?
最满意答案
好的浏览器使用XSLT 1.0处理器,如libxslt,transformix或其他,XSLT 1.0不支持任何创建多个结果文档的方法。 您需要转移到像Saxon 9或XmlPrime或AltovaXML / Raptor这样的XSLT 2.0处理器,以利用xsl:result-document等XSLT 2.0功能。
或者你需要检查你想要使用的XSLT 1.0处理器是否支持扩展来创建多个结果文档,libxslt可能会支持它,但是我不确定当你在浏览器中尝试它时应该发生什么,你需要使用文件系统访问权限从命令行或应用程序代码运行它。
Well browsers use XSLT 1.0 processors like libxslt, transformix or others and XSLT 1.0 does not support any way to create multiple result documents. You would need to move to an XSLT 2.0 processor like Saxon 9 or XmlPrime or AltovaXML/Raptor to make use of XSLT 2.0 features like xsl:result-document.
Or you need to check whether an XSLT 1.0 processor you want to use supports an extension to create multiple result documents, libxslt might support that, but I am not sure what is supposed to happen when you try that in a browser, you would need to run it from the command line or your application code with file system access.
更多推荐
XSLT,xml,文件,file,XML,电脑培训,计算机培训,IT培训"/> <meta name="descript
发布评论