Bug #3095
closed
XPath.evaluate requires platform initialisation
Applies to JS Branch:
0.9, Trunk
Fix Committed on JS Branch:
1.0
Description
Running 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
SaxonJS.getPlatform().initialize({});
beforehand. Preferably this should be triggered from within XPath.evaluate()
but only once.
- 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.
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in version set to 1.0.0
Bug fix applied in the Saxon-JS 1.0.0 release.
- Fixed in JS Release set to Saxon-JS 1.0.0
- Applies to JS Branch 0.9 added
- Fix Committed on JS Branch 1.0 added
- Applies to JS Branch Trunk added
Please register to edit this issue
Also available in: Atom
PDF
Tracking page