0.1.9 • Published 11 years ago

node_xslt v0.1.9

Weekly downloads
92
License
-
Repository
github
Last release
11 years ago

node_xslt

xslt = require('node_xslt')
fs = require('fs')

fs.readFile('test.xsl', function (err, xsltString) {
    if (err) throw err;

    stylesheet = xslt.readXsltString(xsltString);

    fs.readFile('cdcatalog.xml', function (err, xmlString) {
        if (err) throw err;

        doc = xslt.readXmlString(xmlString);
        transformedString = xslt.transform(stylesheet, doc, ['param1Name', 'param1Value', 'param2Name', 'param2Value']);
        console.log(transformedString);
    });

    fs.readFile('cdcatalog.html', function (err, htmlString) {
        ir (err) throw err;

        doc = xslt.readHtmlString(htmlString);
        transformedString = xslt.transform(stylesheet, doc, []);
        console.log(transformedString);
    });
});

Requirements

  • libxml2 (libxml2-dev package for Debian-based distros)
  • libxslt (libxslt-dev package for Debian-based distros)
  • xml2-config (Needs to be on PATH)
  • node-waf & v8.h (Both come with node)

Installation

npm

npm install node_xslt

source

In the root directory, run `node-waf configure build` to generate
./build/default/node_xslt.node
0.1.9

11 years ago

0.1.8

11 years ago

0.1.7

12 years ago

0.1.6

12 years ago

0.1.5

12 years ago

0.1.4

12 years ago

0.1.3

12 years ago

0.1.2

12 years ago

0.1.1

13 years ago