bbc-xsltdeprecated

Node.js bindings for libxslt compatible with libxmljs (variant of node-libxslt)

Usage no npm install needed!

<script type="module">
  import bbcXslt from 'https://cdn.skypack.dev/bbc-xslt';
</script>

README

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