npm.io
0.4.3 • Published 11 years ago

bbc-xslt

Licence
MIT
Version
0.4.3
Deps
3
Vulns
0
Weekly
0
Stars
50
DeprecatedThis package is deprecated
Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)

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

Build status Code Climate NPM version

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
  });  
});

Keywords