Download zip Select Archive Format
Name Last Update history
File dir boot Loading commit data...
File dir experimental Loading commit data...
File dir introspection Loading commit data...
File dir lib Loading commit data...
File dir licences Loading commit data...
File dir samples Loading commit data...
File dir sandbox Loading commit data...
File dir saxon Loading commit data...
File dir third-parties Loading commit data...
File txt README.md Loading commit data...

README.md

Set of utilities and libraries for Saxon-CE

Note: If you have a warning when cloning the repository you need to either install the intermediate certificate for my provider (http://wiki.gandi.net/en/ssl/intermediate) or (temporarily) switch SSL verification off:

$ GIT_SSL_NO_VERIFY=1 git clone https://gitlab.dyomedea.com/vdv/saxon-ce-utils.git
Cloning into 'saxon-ce-utils'...
...

About

This is an enhanced and cleaner version of libraries initially developed for my presentation at XML Amsterdam 2013.

They use dotted JavaScript names introduced by Michael Kay in Saxon-CE's ce1.1plus branch and for your convenience, a build of this branch is available under the saxon directory.

Namespace

The namespace used by these utilities is https://gitlab.dyomedea.com/vdv/saxon-ce-utils/, identified below by the prefix scu:.

Content

These utilities are divided into a library and a set of features.

saxonUtilities context object

The "context" is a global JavaScript property called saxonUtilities. This object initially contains a function used to instanciate for map objects.
Features are invited to store their own objects under this global object rather than spread them elsewhere.
The context is created by the scu:init named template and features are strongly invited to call this template during initialization (scu:init can safely be called multiple times).

Library

The library is composed of:

  • lib/saxon-ce-dummy-declarations.xsl: a cosmetic library after an idea from Michael Kay to avoid irritating error messages from your favorite XSLT editor. Note that this file cannot contain a full list of all available JavaScript functions and needs to be updated according to your needs!
  • lib/lib.xsl: the main library file, composed of functions related to:
    • Convenience functions: scu:get-global()
    • Context related functions and template: scu:init, scu:get-context(), scu:set-context
    • Functions emulating XSLT 3.0 map functions: scu:map-new(), scu:map-keys(), scu:map-contains(), scu:map-get(), scu:map-entry(), scu:map-remove().
    • Functions to serialize and convert nodes (either tinytree or JS): scu:scu:serializeXML(), scu:convert-to-jsdom()
  • lib/xml-to-string.xsl: Evan Lenz' implementation of an XML serialization (imported by lib.xsl).
  • lib/indent.xsl: this library indents DOM documents without serializing them.

These functions should be straightforward to use.

Features

Available features are:

The boot feature doesn't depend on any JavaScript library. Introspection and sandbox rely on CodeMirror, jQuery and Bootstrap.
For your convenience, copies of these libraries are included in the third-parties directory.

Samples

Samples are available in the samples directory.

Licenses

They are published under the LGLP license version 3.0.
Saxon-CE and the libraries used my these libraries are available under different Open Source licenses.
All these licenses are available under the licenses directory.

See Also

Enjoy!

--Eric van der Vlist