XPath.evaluate requires platform initialisation
XPath.evaluate() requires the polyfill functions loaded (such as
Math.trunc@) from @BrowserPlatform.initalize()@. Currently this action is not performed by @XPath.evaluate() (but it is by @SaxonJS.transform()@) and requires a deliberate
beforehand. Preferably this should be triggered from within
XPath.evaluate() but only once.
#1 Updated by Debbie Lockett about 2 years ago
- Status changed from New to Resolved
- Found in version set to 0.9.1
Moved the initialization (of polyfills and Atomic.init) from within the SaxonJS.transform method to within the main load of Saxon-JS (i.e. initialize method in body of transform.js). Here it has been merged with the code for setting the platform, to form one "initialization phase" consisting of the call of initialize().
This is straightforward for the browser platform.
For the Nashorn platform, this required some reorganisation of code:
Reordering of library loading in RunJSTransform.java, so that JSTestDriver.js is first, and transform.js is last (this order is more comparable to that for the browser platform).
Add platform.initialize method for JSTestDriver, and remove the initialization previously inside the JSTestDriver.transform method.
Please register to edit this issue