Citeproc-js in worker threads

The citeproc-js bundle contains a parsing file named xmljson.js, added
quite some time ago, after a conversation with Simon Kornblith.

In a browser environment, the xmljson.js parser makes it possible to
run citeproc-js in a worker thread, where DOM methods are not
permitted. Apart from converting the style and locale XML to
JavaScript object form and installing the xmljson.js parser code, the
processor is run in the usual way, with the JS objects used as drop-in
replacements for the XML.

The missing piece to the puzzle has been the conversion method - for
initial testing, I used locales and styles pre-converted with a Python
script, which wasn’t terribly convenient for production. I recently
had a need for a JS version of the converter, so here it is:

https://github.com/fbennett/csl-json-walker

It has a CC0 license, do with it what you will. Hope it makes things easier!

Frank

In relation to citeproc-js issue #120 [1] I think this is going to be
very useful for citeproc-java! Thanks a lot for posting the tool! I’ll
have a look at it over the weekend.

Cheers,
Michel

[1]
https://bitbucket.org/fbennett/citeproc-js/issue/120/create-npm-package-for-nodejs

And for the npm package as well of course …

Cheers,
Michel