npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

saxon-node

v0.2.1

Published

An exploration of binding Saxon/C

Downloads

6

Readme

saxon-node

An exploration of binding Saxon/C http://www.saxonica.com/html/saxon-c/index.html (XSLT 2.0/3.0, XQuery 1.0/3.0, Schema Validation 1.0/1.1 and XPath 2.0/3.0). Professional and enterprise features can be accessed with your license from Saxonica.

Upgraded to 1.0.2 API. The method names mirror http://www.saxonica.com/saxon-c/doc/html/index.html.

Note: release v0.2.1 is linux and mac and pending windows version of Saxon/C 1.0.2

Note: release v0.2.0 is linux only pending the release of mac and windows versions of Saxon/C 1.0.1

Note: release v0.1.1 is built with nodejs v4.2.x [v4.2.x has Buffer acting like Uint8Array and currently is indistinguishable on the native side yet seems to work for this project]. If you want v0.12.x compatibility stay with v0.0.5. npm will continue with nodejs v4.2.x line and any fixes or features needed by prior versions will be from github branches.

To tell it where the Saxon/C is set the environment variable SAXONC_HOME to path:

export SAXONC_HOME=/home/user/Software/Saxonica/Saxon-HEC1.0.2

####Prebuilts

linux-x64,linux-ia32, darwin-x64 and win32-ia32(no saxon-c 1.0.2 yet).

npm install --fallback-to-build

will first try to find a compatible native prebuilt. If it works you won't need development tools and compilers.

####Building (only if needed; contact me if there is a particular prebuild you would use) If a compatible prebuilt is not found, a number of environment variables are needed. For the build phase, as with integrating Saxon/C interface code in c/c++ applications the jni.h is needed. Set JAVA_HOME and the binding.gyp locates the jni.h from there. Only the headers are used; libsaxon.so that comes wth Saxon/C is loaded from it's home folder. The libsaxon.so depends on $SAXONC_HOME/rt during runtime and it needs library paths $SAXONC_HOME:$SAXONC_HOME/rt/lib/amd64/jetvm:$SAXONC_HOME/rt/lib/amd64. rt is the runtime http://www.excelsiorjet.com/ that Saxon/C provides. To run it needs the harmony switch and at least nodejs v4.2.x. Make sure there isn't a java path to jvm in front of the Excelsior JET tool in rt folder:

export LD_LIBRARY_PATH=$SAXONC_HOME:$SAXONC_HOME/rt/lib/amd64/jetvm:$SAXONC_HOME/rt/lib/amd64:$LD_LIBRARY_PATH
node --harmony saxon-node.js /home/user/testing-grounds/BCL/analyze.xml /home/user/NetBeansProjects/OOBackbone/stylesheets/divconIsSpecies.xsl

Yet this isn't the purpose to run xslt as this small app. The intention is the calling of the API from your applications.

####To test

export LD_LIBRARY_PATH=$SAXONC_HOME:$SAXONC_HOME/rt/lib/amd64/jetvm:$SAXONC_HOME/rt/lib/amd64:$LD_LIBRARY_PATH
mocha --harmony --require should

Documentation: Saxon Node API