Bug #3440

Handling asynchronous document fetch failures

Added by Debbie Lockett over 1 year ago. Updated over 1 year ago.

Start date:
Due date:
% Done:


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


Asynchronous document fetches are achieved using ixsl:schedule-action/@document. However failures are not handled properly.

Using Saxon-JS 1.0.1 (or earlier), if the requested document in ixsl:schedule-action/@document is not returned, then this always results in an uncaught XError.

An error should only get raised from a subsequent call to doc(), while doc-available() should return false.


#1 Updated by Debbie Lockett over 1 year ago

Added JS unit test ixsl2/schedule02 which uses doc-available() within called template, where document fetch fails. (Plus comparison test ixsl2/schedule03 where document fetch succeeds.)

#2 Updated by Debbie Lockett over 1 year ago

  • Status changed from New to Resolved
  • Fix Committed on JS Branch 1.0, Trunk added

Changed the code so now if an asynchronous document fetch fails, then an entry is added to the document pool (with the URI as the key and the XError as the value); rather than throwing the error immediately. When we subsequently try to access the document from the pool, we pick up the XError - so the doc() and doc-available() functions will work correctly.

Fix committed on 1.0 and trunk branches.

#3 Updated by Debbie Lockett over 1 year ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to Saxon-JS 1.0.2

Bug fix applied in Saxon-JS 1.0.2 maintenance release.

Please register to edit this issue

Also available in: Atom PDF Tracking page