Skip to content

pauldorn/node_xslt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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, []);
        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
  • libxslt
  • 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

About

a simple XSLT addon for node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 55.8%
  • C 44.2%