Saxonica: Saxon-JS release notes

Saxon-JS Release Notes

Maintenance release 1.0.2

5 October 2017

Bug fixing maintenance release.

In general for use with Saxon-JS 1.0 SEFs should be produced with Saxon-EE or later, though a number of features introduced in Saxon-JS 1.0.1 require SEFs produced with Saxon-EE 9.8 (see the documentation for details).


  • A space-separated list can now be supplied in the document attribute of ixsl:schedule-action, to fetch multiple documents before the contained call is invoked.

Bug fixes

  • Feature #2889: Missing error trapping in Calculate
  • Bug #3268: Saxon-JS documentation app problems in Safari on iPad (and other handheld devices)
  • Bug #3362: reverse() modifies its argument
  • Bug #3369: Incorrect test for node identity in p.genNode pattern matching
  • Bug #3370: currentGroup / currentGroupingKey
  • Bug #3377: HTML base tag ignored in stylesheetLocation and sourceLocation
  • Bug #3380: xsl:analyze-string with a regex that matches a zero-length string
  • Bug #3383: General Comparison in 1.0 compatibliity mode: cannot compare xs:string with xs:integer
  • Bug #3386: deep-equal() fails comparing attributes
  • Bug #3393: "<" treated as entity characters within XPath.evaluate()
  • Bug #3417: unparsed-text-lines() incorrect behaviour with blank lines
  • Bug #3419: format-number() rounding issues
  • Bug #3431: non-default exponentSeparator character not interpolated
  • Bug #3440: Handling asynchronous document fetch failures
  • Feature #3441: Asynchronous fetch for a list of documents
  • Bug #3442: Problems reusing parameters after ixsl:schedule-action
  • Bug #3454: Documentation for ixsl:schedule-action/@http-request
  • Bug #3470: SaxonJS 1.0.1 fails when calling the key() function; SaxonJS 1.0.0 works well

Also includes a patch for a known Edge bug related to regular expressions used in reading XML resources (see Forum issue #6873).

Maintenance release 1.0.1

21 July 2017

Maintenance release for use on web browsers. A number of new features require SEFs produced with Saxon-EE 9.8 (in general SEFs should be produced with Saxon-EE or later for use with Saxon-JS 1.0).


  • Many more XSLT 3.0 features are now implemented. Some require Saxon 9.8 at compile time. See conformance for full details. Newly implemented features include:
    • xsl:where-populated, xsl:on-empty, xsl:on-non-empty, xsl:fork
    • snapshot(), available-system-properties()
    • use of initial mode "#unnamed"
    • accumulators (requires Saxon 9.8)
    • collection() (requires Saxon 9.8)
    • merging (requires Saxon 9.8)
    • multiple packages (requires Saxon 9.8)
    • xsl:source-document in non-streaming mode (requires Saxon 9.8)
    • xsl:context-item (requires Saxon 9.8)
    • Support for collations has been extended to XSLT instructions as well as XPath functions
    • Regex character class subtraction
    • Fixes for xsl:evaluate (default XPath namespace; support for @as result type restriction; support for xsl:with-param in addition to @with-params)
  • Additions to the SaxonJS.transform API: initial-function and function-params to allow function call invocation; collations to supply collations; collectionFinder to supply collections.
  • The SaxonJS.transform() option initial-mode set to "#unnamed" can be used to force use of the unnamed mode. If initial-mode is not set, then the default-mode specified in xsl:stylesheet (or xsl:package) is used, defaulting to the unnamed mode.
  • Added interactive XSLT mechanism for making asynchronous HTTP requests directly from the stylesheet - using the new http-request attribute on ixsl:schedule-action (requires Saxon 9.8). See HTTP messages for more information.
  • Using Saxon 1.0.0 or earlier, URIs in the doc() function and in the document attribute of ixsl:schedule-action were always interpreted relative to the SEF's location. In Saxon-JS 1.0.1, the behaviour depends on whether the SEF is relocatable, since this will determine the static-base-uri(). From Saxon 9.8, a relocatable SEF can be produced by setting the Transform command line option -relocate:on at compile time. If the SEF is relocatable, then static-base-uri() is the base URI of the SEF; otherwise it is the location of the XSLT stylesheet at compile time. For full details see the section about relative URIs at Source documents.

Bug fixes

  • Feature #3004: Support for HTTP POST/PUT
  • Bug #3036: Saxon-JS documentation app problems in Chrome on computers with touch screens
  • Bug #3066: Specialist name() treatment of XHTML elements
  • Bug #3130: Source document has a non-absolute base-uri()
  • Bug #3131: XPath.evaluate - incorrect comparison typing for xs:QName
  • Bug #3133: xs:numeric cast not preserving value type
  • Bug #3134: map:get() key not being atomised
  • Bug #3139: Complex Content incorrectly handing text-nodes
  • Bug #3140: XPath.evaluate should check initial context-item cardinality
  • Bug #3146: system-property("xsl:supports-dynamic-evaluation") returns "no"
  • Bug #3148: xsl:evaluate doesn't support use of user-defined functions
  • Bug #3149: Constructed element node lacks xmlns="" undeclaration
  • Bug #3161: || operator in dynamic XPath does no type checking
  • Bug #3167: Problems with QName hash-codes in trieWithCollation()
  • Bug #3170: Attributes with no prefix in name get assigned 'ns'
  • Bug #3187: Printing
  • Bug #3203: Default namespace XHTML not appearing in namespace-uri-from-prefix()
  • Bug #3216: Error QNames are not ordered
  • Bug #3221: p.genPos pattern not implemented in Saxon-JS
  • Bug #3231: Default treatment of Atomic items in text-only-copy incorrect
  • Bug #3335: Lazy evaluation of sequence constructors - instructions with side effects evaluated early

Major release 1.0.0

7 February 2017

First major release, for use on web browsers. For use with Saxon-JS 1.0, SEFs should be produced with Saxon-EE or later.


  • For use with Saxon-JS 1.0, SEFs should be produced with Saxon-EE or later. (Most SEFs produced by older versions of Saxon-EE will run as before, but some will fail with an error directing the user to regenerate the SEF.)
  • Added Dynamic XPath evaluation for use with xsl:evaluate, and directly via the XPath API.
  • The use of collations in XPath functions is now implemented, see Conformance for details (and restrictions).
  • Known performance issues have been addressed.

Bug fixes

  • Bug #3071: Bad performance of xsl:result-document with deeply nested output content
  • Bug #3095: XPath.evaluate requires platform initialisation
  • Bug #3098: Supplied value "..." is not a valid xs:base64

Maintenance beta release

12 December 2016

Maintenance release for use on web browsers.

Bug fixes:

  • Bug #3067: Specialist name() treatment of XHTML elements

Maintenance beta release 0.9.1

9 December 2016

Maintenance beta release for use on web browsers (Safari, Firefox, Chrome, Opera, Internet Explorer, and Edge). This release can be used with SEFs produced by Saxon-EE or later, but for all the latest features use Saxon-EE or later.


  • The form <xsl:result-document href="?."> can now be used to specify the current context as the target for inserting generated HTML fragments, see Result documents.
  • Added support for the transform options sourceNode and sourceText, see SaxonJS.transform.
  • Values for stylesheet parameters with type map(*) and array(*) can now be supplied using the transform option stylesheetParams (requires Saxon-EE or later). See Supplying stylesheet parameters.
  • The interactive XSLT function ixsl:apply() is added (requires Saxon-EE or later).
  • The XSLT 3.0 xsl:iterate and xsl:evaluate instructions are now implemented (requires Saxon-EE or later).
  • The third-party URI.js library is no longer used.
  • Extended browser support: Saxon-JS 0.9 tested with current versions of Safari, Firefox and Chrome; Saxon-JS 0.9.1 also tested with Internet Explorer, Edge and Opera.

Bug fixes

  • Bug #2752: JS: nashorn references in core (browser) code
  • Bug #2796: JS: xs:date() can modify timezone for pure dates
  • Bug #2833: JS: anomalous descendant behaviour under ixsl:page()
  • Bug #2884: Registering event listeners for objects outside DOM
  • Bug #2885: Use of URI.js
  • Feature #2886: Converting JS Objects to XDM maps
  • Bug #2888: Static base-uri for in-browser exported stylesheets.
  • Bug #2890: document.createAttributeNS() deprecated - warning in Firefox
  • Bug #2891: Checksum in SEF file
  • Bug #2913: does not work with Edge
  • Bug #2923: Incorrect comparison for xs:numeric and NaN
  • Bug #2941: Crash when there is no context item
  • Bug #2942: Failure to specify -target:JS
  • Bug #2944: Use of xsl:sequence within copy situations is node-destructive
  • Bug #2945: for-each-group context not being preserved over context-altering steps
  • Bug #2947: Cities List example
  • Bug #2948: SEF metadata
  • Feature #2966: xsl:iterate
  • Bug #2992: treat as not testing sequence cardinality
  • Bug #3007: sourceNode or sourceText property of options argument of transform method not used
  • Bug #3008: ixsl:query-params() does not allow for multiple values associated with a single field
  • Bug #3012: In browser, do not always produce HTML elements in result documents when they should be produced
  • Bug #3020: _APPLY() construct has not been implemented in Saxon-JS

First beta release 0.9

28 July 2016

First beta release for use on web browsers with SEFs produced by Saxon-EE or later.