Feature #3462
closedAsynchronous fetch for internal resources
100%
Description
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:
-
Require the developer to load the required resources, e.g. by providing an API method to be called in an HTML script.
-
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.
Updated by Debbie Lockett over 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.)
Updated by Debbie Lockett over 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
Please register to edit this issue
Also available in: Atom PDF Tracking page