user3518031
user3518031

Reputation: 13

node_xslt for Transformation.

I am using node_xslt for Transformation. Readme for library tells that I should have libxslt and libxml2. Where should I place these libraries? I am getting the transformations to work for simple cases,but not for complicated cases (when I use saxon transformation). Any help would be appreciated. Thank You.

Upvotes: 1

Views: 3097

Answers (1)

Alex Netkachov
Alex Netkachov

Reputation: 13522

node_xslt is a C/C++ extension so it should be compiled during installation with the libraries available on your system. If the compilation fails, then you have this libraries missing (which is highly unlikely on the modern OS).

Update:

What I've just did on my Mac (OS X, 10.9.3):

$ npm install node_xslt

... big output here

Then I've created three files:

test.js

var xslt = require('node_xslt');                                              
var stylesheet = xslt.readXsltFile('./test.xsl');                             
var document = xslt.readXmlFile('./test.xml');                                                                                                            
console.log(xslt.transform(stylesheet, document, [ ]));  

and two files from this page: http://msdn.microsoft.com/en-us/library/ms765388(v=vs.85).aspx

And then run the test.js:

$ node test.js

and it prints the transformation result successfully.

Upvotes: 3

Related Questions