XSLT 2.0 or 3.0 for Node.js?

只谈情不闲聊 提交于 2019-12-12 04:14:51

问题


I've been looking for a node module that supports XML to HTML/XSL version 2.0 transformations via XSLT. I'm confined to developing in a windows environment, and have researched many alternatives including Saxon/C (saxon-node), node_xslt, gulp-xslt, and some others.

I haven't found a solution that satisfies our needs. Most solutions seem to require a linux or mac osx environment for development.

Any ideas? I greatly appreciate the help in advance!


回答1:


Your best bet for XSLT in Node.js would be Saxon-JS, which is a XSLT 3.0 runtime in pure JavaScript1. Note that you'll need Saxon-EE, a commercial product, to compile your XSLT, but once that's done, you can freely deploy the result and the runtime. As a bonus, Saxon-JS implements not only XSLT 2.0 but XSLT 3.0 as well.


1Caveat: Saxon-JS will clearly be your best bet once Saxonica adds support for parsing and serialization to the JavaScript runtime. Before then, these limitations will severely restrict the suitability of Saxon-JS to many projects, including possibly yours.



来源:https://stackoverflow.com/questions/45309668/xslt-2-0-or-3-0-for-node-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!