Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NodeJs XSLT Transformation

I need to transform an XML document using XSLT in nodejs. I can’t seem to find a library for nodejs that is currently maintained and encompasses the full standard of XSLT.

Does anyone have any suggestions on a package or something in native nodejs to perform transformation?

like image 220
user3597741 Avatar asked Aug 14 '19 13:08

user3597741


People also ask

Is XSLT obsolete?

The XslTransform class is obsolete in . NET Framework version 2.0. The XslCompiledTransform class is a new implementation of the XSLT engine.

How does XSLT transformation work?

XSLT Processor takes the XSLT stylesheet and applies the transformation rules on the target XML document and then it generates a formatted document in the form of XML, HTML, or text format. This formatted document is then utilized by XSLT formatter to generate the actual output which is to be displayed to the end-user.

Is XSLT easy?

XSLT has several important advantages over all other programming languages when it comes to XML data transformation: It has been designed to work with enterprise XML technologies. It makes most data conversion tasks very easy to understand and implement.


1 Answers

2020 Update

Saxon-JS 2 now supports XSLT 3.0 in Node.js and in the browser!


Former answer

Your only (pure JavaScript, XSLT standards compliant) hope is Saxon-JS, but it may not be entirely ready to run on Node.js yet:

  • XSLT 2.0 or 3.0 for Node.js?
  • Saxon-JS should depend only upon JavaScript, not web browsers
  • Is SaxonJS 1.1.0 compliant with NodeJS 8.9.4 ?
  • SaxonJS on Node.js

Michael Kay reads Q/A here and may perhaps provide an update beyond what's listed in the above links.

like image 64
kjhughes Avatar answered Nov 06 '22 15:11

kjhughes