Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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'
  ]
)

About

a simple XSLT addon for node

Resources

License

Releases

No releases published

Packages

No packages published