尝试使用XSLT拆分XML文件时出错(Error when trying to split an XML file using XSLT)

编程入门 行业动态 更新时间:2024-10-28 14:27:05
尝试使用XSLT拆分XML文件时出错(Error when trying to split an XML file using XSLT)

我一直在尝试根据其节点分割多个文件的大型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

本文发布于:2023-08-03 15:04:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1393500.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   XML   XSLT   file   split

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!