Feature #3462


Asynchronous fetch for internal resources

Added by Debbie Lockett over 6 years ago. Updated almost 4 years ago.

Start date:
Due date:
% Done:


Estimated time:
Applies to JS Branch:
1.0, Trunk
Fix Committed on JS Branch:
Fixed in JS Release:
SEF Generated with:
Contact person:
Additional contact persons:


We currently use synchronous fetches for Saxon-JS internal resources: opt/functions.json used by function-available(); opt/categories.json used for some advanced regex; and lib/xpath/XPathJS.min.js. But we should use asynchronous fetches. We need to work out the best way to do this. Possible options:

  1. Require the developer to load the required resources, e.g. by providing an API method to be called in an HTML script.

  2. Read from the SEF that the resource will be needed, and fetch during initialisation (before starting the transform).

(1) is not ideal because this is adds work for the developer, when we did not previously require the use of such features to be stated up front. If resources are not correctly loaded then an application may break.

A problem with (2) is that we do not necessarily know at compile time that resources (e.g. categories.json) will be required.

Actions #1

Updated by Debbie Lockett about 4 years ago

  • Description updated (diff)
  • Status changed from New to Resolved
  • Fix Committed on JS Branch Trunk added

All dynamic loading of internal resources has been eliminated for Saxon-JS 2.0. The internal resources which were dynamically loaded as required for Saxon-JS 1.x (opt/functions.json, opt/categories.json, and lib/xpath/XPathJS.min.j) will be built-in for Saxon-JS 2.0.

(Note that during development for Saxon-JS 2.0, we had the option of using dynamic loading to obtain the XX compiler. This will also be removed for the released product. For the browser release, we will have two versions: a "min" version which does not include the XX compiler, and a bigger "full" version which does.)

Actions #2

Updated by Debbie Lockett almost 4 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to Saxon-JS 2.0
Actions #3

Updated by Debbie Lockett almost 4 years ago

  • Category set to Internals

Please register to edit this issue

Also available in: Atom PDF Tracking page