使用node.js中的XSLT样式表将xml转换为html

时间:2021-08-19 21:49:35

Has anyone tried to convert xml file into html webpage using XSLT stylesheet in node.js? My background is in Java. I normally use SAXON to convert XML into HTML webpages. I am a newbie to node.js. I have tried to implement this using few libraries like node_xslt, libxsltjs etc but was not successful. If anyone has tried using other libraries that works with XSLT stylesheet, please post a link. Any help would be appreciated.

有没有人试图使用node.js中的XSLT样式表将xml文件转换为html网页?我的背景是Java。我通常使用SAXON将XML转换为HTML网页。我是node.js的新手。我试图使用像node_xslt,libxsltjs等少数库来实现它,但是没有成功。如果有人尝试使用其他适用于XSLT样式表的库,请发布链接。任何帮助,将不胜感激。

1 个解决方案

#1


3  

If you want to use Saxon from a Node.js application, you basically have three choices, none of them ideal:

如果你想在Node.js应用程序中使用Saxon,你基本上有三个选择,其中没有一个是理想选择:

(a) call out to Java, using a variety of mechanisms.

(a)使用各种机制调用Java。

(b) use the port of Saxon/C to Node.js being constructed here: https://github.com/rimmartin/saxon-node This is bleeding-edge stuff and I don't know how far the project has got.

(b)使用Saxon / C的端口到这里构建的Node.js:https://github.com/rimmartin/saxon-node这是最前沿的东西,我不知道该项目有多远。

(c) wait for Saxon-JS to arrive any time soon. See http://dev.saxonica.com/blog/mike/2016/02/introducing-saxon-js.html

(c)等待Saxon-JS很快到达。请参阅http://dev.saxonica.com/blog/mike/2016/02/introducing-saxon-js.html

#1


3  

If you want to use Saxon from a Node.js application, you basically have three choices, none of them ideal:

如果你想在Node.js应用程序中使用Saxon,你基本上有三个选择,其中没有一个是理想选择:

(a) call out to Java, using a variety of mechanisms.

(a)使用各种机制调用Java。

(b) use the port of Saxon/C to Node.js being constructed here: https://github.com/rimmartin/saxon-node This is bleeding-edge stuff and I don't know how far the project has got.

(b)使用Saxon / C的端口到这里构建的Node.js:https://github.com/rimmartin/saxon-node这是最前沿的东西,我不知道该项目有多远。

(c) wait for Saxon-JS to arrive any time soon. See http://dev.saxonica.com/blog/mike/2016/02/introducing-saxon-js.html

(c)等待Saxon-JS很快到达。请参阅http://dev.saxonica.com/blog/mike/2016/02/introducing-saxon-js.html