0.4.3 • Published 9 years ago
bbc-xslt v0.4.3
A variant of the package node-libxslt that works with Node version 0.12.2.
The compatible version of libxmljs can used with it like so:
var libxmljs = require('bbc-xslt').libxmljs;
bbc-xslt
Node.js bindings for libxslt compatible with libxmljs.
Installation
npm install bbc-xslt
Basic usage
var bbc-xslt = require('bbc-xslt');
bbc-xslt.parse(stylesheetString, function(err, stylesheet){
var params = {
MyParam: 'my value'
};
// 'params' parameter is optional
stylesheet.apply(documentString, params, function(err, result){
// err contains any error from parsing the document or applying the stylesheet
// result is a string containing the result of the transformation
});
});