Project

Profile

Help

Feature #3462

Updated by Debbie Lockett almost 4 years ago

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. 
 

Back