Saxon-JS use cases

Added by Kean Erickson over 3 years ago

Hello all,

I have a few questions regarding how Saxon-JS could be used.

  1. Is it true that Saxon-JS is meant as an alternative to the server running java with saxon, and that it isn't needed if the server has those things?
  2. Would saxon-JS be a way to offload some of the resources-intensive work in putting the runtime load on the client? Or is a microservices approach likely still probably better for that sort of thing.
  3. Would Saxon-JS make it any easier to test against different versions of saxon (with something like XSpec)? I'm guessing this wouldn't work since the compile and runtime phases would need to share the version of saxon?

Replies (2)

RE: Saxon-JS use cases - Added by Michael Kay over 3 years ago

(1) Saxon-JS can run either in the browser or on node.js

  • In the browser, it's (a) an upgrade on the XSLT 1.0 processors built in to the browser, giving you XSLT 3.0 instead of 1.0, and (b) an alternative to Javascript for handling user interaction.

  • On node.js, it performs the same role as Saxon on Java, i.e. server-side processing, but on a different platform; so it's there primarily for people who are already committed to the node.js platform.

(2) Offloading compute-time from the server to the browser is a potential scenario but I'm not sure the need arises that often. Network latency is usually a more important factor these days. If you're doing something like creating an SVG graphical rendition of an XML data set, then there's certainly a performance argument for doing it client-side, and Saxon-JS can help with that. As soon as the visualisation becomes interactive (e.g. with ability to zoom in on detail) then doing it client-side gives a much better user experience.

(3) Not really sure what you have in mind here. If you want to test with a particular version of Saxon, then you have to use that version.

RE: Saxon-JS use cases - Added by Kean Erickson over 3 years ago

Thanks for the comprehensive response!


    Please register to reply