a simple XSLT addon for node
C++ Python
Switch branches/tags
Nothing to show
Latest commit dda8a90 Sep 9, 2015 @CentaurWarchief CentaurWarchief Update README.md
Permalink
Failed to load latest commit information.
.editorconfig Update README.md Sep 9, 2015
.gitignore sample hello world addon Jul 21, 2011
LICENSE.txt added license Dec 18, 2011
README.md Update README.md Sep 9, 2015
binding.gyp Disabling warnings by third-party libraries Dec 26, 2014
macros.h refactored code using k7 macros Jul 23, 2011
node_xslt.cc added @andreyknupp's useInternalErrors() option to XML parsing too, t… May 10, 2014
package.json Update package.json Sep 9, 2015
scopeguard.h minimal working version Jul 23, 2011
wscript

README.md

node_xslt

Installation

npm install node_xslt --save

Or:

In the root directory, run node-gyp rebuild to generate ./build/Release/node_xslt.node

Then:

var xslt = require('node_xslt')

Requirements

  • libxml2 (libxml2-dev package for Debian-based distros)
  • libxslt (libxslt-dev package for Debian-based distros)
  • libexslt (libxslt-dev package for Debian-based distros)
  • xml2-config (Needs to be on PATH)

API

Method Arguments Return Description
readXsltString string Stylesheet {} Uses the specified XSLT for transformation
readXsltFile string Stylesheet {} Loads the XSLT from file
readXmlString, readHtmlString string Document {} Imports XML/HTML from string
readXmlFile, readHtmlFile string Document {} Imports the XML/HTML file
transform Stylesheet, Document, string[] string Transforms the document

Example

xslt.transform(
  stylesheet,
  document,
  [
    'paramName',
    'paramValue',
    'paramName',
    'paramValue'
  ]
)