ixsl:schedule-action return objects
In SaxonJS 2,
ixsl:schedule-action with the
It would be useful to clarify this behaviour in the SaxonJS 2 documentation.
Updated by Debbie Lockett 24 days ago
- Assignee set to Debbie Lockett
Furthermore, on the SaxonJS 3 development branch, the implementation of
ixsl:schedule-action has been updated to use the Fetch API for HTTP requests and document fetching, both in the browser and on Node.js. Rather than returning XHR objects, we return AbortControllers, on Node.js as well as in the browser (enabling use of the aborting mechanism). So while
ixsl:schedule-action/@document returns an empty sequence with SaxonJS 2 on Node.js; it returns an object in SaxonJS 3. We give advice to throw away the result of an
ixsl:schedule-action instruction to prevent it being written to the current result tree (https://www.saxonica.com/saxon-js/documentation2/index.html#!ixsl-extension/instructions/schedule-action); but it is easy to make this mistake (see the current failure of nodejs unit test
schedule-009), and potentially even more so with this change between SaxonJS 2 and 3.
Perhaps we can amend the implementation so that the instruction only returns objects when we are not writing to the current result tree (i.e. when
context.tempOutputState !== false); so it always just returns an empty sequence when writing to the current result tree.
Updated by Debbie Lockett 19 days ago
Maybe it's not actually surprising that the mechanism for aborting HTTP requests is not actually available in Node.js: what would that actually look like? The mechanism works in the browser with user interaction; but we don't actually have that in Node.js, do we?
Please register to edit this issue
Also available in: Atom PDF Tracking page