Project

Profile

Help

Bug #3095

XPath.evaluate requires platform initialisation

Added by John Lumley over 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Low
Assignee:
Sprint/Milestone:
-
Start date:
2017-01-03
Due date:
% Done:

100%

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

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.

History

#1 Updated by Debbie Lockett over 1 year 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:
1. 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).
2. Add platform.initialize method for JSTestDriver, and remove the initialization previously inside the JSTestDriver.transform method.

#2 Updated by Debbie Lockett over 1 year ago

  • 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.

#3 Updated by Community Admin 10 months ago

  • 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

#4 Updated by Community Admin 10 months ago

  • Applies to JS Branch Trunk added

Please register to edit this issue

Also available in: Atom PDF Tracking page