Project

Profile

Help

Bug #3095

closed

XPath.evaluate requires platform initialisation

Added by John Lumley over 7 years ago. Updated over 6 years ago.

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

100%

Estimated time:
Applies to JS Branch:
0.9, Trunk
Fix Committed on JS Branch:
1.0
Fixed in JS Release:
SEF Generated with:
Platforms:
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.

Actions #1

Updated by Debbie Lockett over 7 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:

  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.

Actions #2

Updated by Debbie Lockett about 7 years 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.

Actions #3

Updated by Community Admin over 6 years 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
Actions #4

Updated by Community Admin over 6 years ago

  • Applies to JS Branch Trunk added

Please register to edit this issue

Also available in: Atom PDF Tracking page