1.0.0 • Published 7 years ago

express-xsltproc v1.0.0

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
7 years ago

express-xsltproc

Build Status

Getting started

THIS PACKAGE USES AWAIT/ASYNC AND REQUIRES NODE 7.x

Install the module with: npm install express-xsltproc --save

There is an external dependency on xsltproc required by node-xsltproc. Check its documentation.

Options

  • sourcedir : root folder where to serve file from (default: '.')
  • warning_as_error : treat xsltproc warning as error (default: true)
  • additional options are passed as it is to node-xsltproc

Notes

  • This middleware only answers to the GET method.
  • The path must end by *.xml.
  • The file must have a <?xml-stylesheet type="text/xsl" href="XXX.xsl"?> tag

Exemples

const express = require('express');
const xsltproc = require('express-xsltproc');

let app = express();
app.use(xsltproc({sourcedir: 'test/fixtures'}));
app.listen(3000, function () {
  console.log('Example app listening on port 3000!');
});