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
Size: 152
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
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);
});
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);
});