Re: [Saxon-CE] Saxon.js on the server? (#1)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [Saxon-CE] Saxon.js on the server? (#1)

O'Neil Delpratt
Hi Martin,

Node.js is an interest technology that I never got around to trying out or needed to use. However, Saxon/C and node.js seems like an project worth pursuing from an XSLT prospective.

I have added the xsl-list and the Saxon mailing-list to this email to see if anyone from the XSLT community who has experience of using node.js would find this project of use and interesting. 

Kind regards,

O'Neil
On 6 Jan 2015, at 23:27, rimmartin <[hidden email]> wrote:

Hi,
for nodejs I put some c++ glue together to make a V8/node module work with Saxon/C http://www.saxonica.com/saxon-c/index.xml instead of Saxon-CE. Typical node code is

try
{
    var content = yield fs.readFile(global.inputXmlPath, "utf8");
    var saxonProcessor = new saxon.SaxonProcessor(false);
    var xsltProcessor = saxonProcessor.newTransformer();
    xsltProcessor.compile(global.xslPath);
    xsltProcessor.parseXmlString(content);
    var pdbContent = xsltProcessor.xsltApplyStylesheet();
    console.dir(pdbContent);
}
catch (err) {
console.dir(err.message);
}

Works like a charm. It is based on nodejs --harmony using the new yields and generators.

Would this be of interest to the xslt and node communities?

To do: I need to implement parameters and properties. Can readily add xquery processor as well.


Reply to this email directly or view it on GitHub.


-------------------------------
O'Neil Delpratt
Software Developer, Saxonica Limited 
Email: [hidden email]
Tel: +44 118 946 5894
Web: http://www.saxonica.com
Saxonica Community site: http://dev.saxonica.com
Bug tracking site: https://saxonica.plan.io/




------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help