bbc/fluxslt

Name: fluxslt

Owner: BBC

Description: Easy XSLT Transformations in Node

Created: 2015-08-20 15:27:34.0

Updated: 2017-05-15 08:15:03.0

Pushed: 2016-12-07 14:28:37.0

Homepage:

Size: 152

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

fluxslt

Description

This library is a fluent wrapper with helper functions around xsltproc. It comes bundled with libxslt on your platform, so you'll need to make sure you've got that installed before you try running this.

Example Usage
stylesheet = fs.readFileSync('path/to/my/stylesheet', 'utf-8'),
xmlContent = fs.readFileSync('path/to/xml/doc', 'utf-8'),
fluxslt = require('fluent-xslt');

slt()
.withStylesheet(stylesheet)
.runOn(xmlContent)
.then(function(transformed) {
    console.log(transformed);
});
 or
xmlContent = fs.readFileSync('path/to/xml/doc', 'utf-8'),
fluxslt = require('fluent-xslt');

slt()
.withStylesheetPath('path/to/my/stylesheet')
.runOn(xmlContent)
.then(function(transformed) {
    console.log(transformed);
});

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.