Feature #5083


Saxon-JS in the browser should support data: and blob: URLs

Added by Martin Honnen almost 3 years ago. Updated almost 2 years ago.

Start date:
Due date:
% Done:


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


Browsers support URLs with the scheme data: or blob:, Saxon-JS in the browser should not reject such URLs but support loading resources from them as the browser APIs support that. Also, data: URLs are already supported in Saxon Java.

Use cases are e.g. xsl:import or xsl:include from a blob or data URL, for instance, if the user entered some XSLT module you want to xsl:import that would be possible with data or blob URL support. Interestingly enough, this does work with the browser's native XSLT 1.0 processor, at least as far as I have tested with Chrome and Firefox.

Test case that shows that currently it doesn't work with Saxon-JS 2.3 is at (need to open F12/developer tools to see the error message about e.g. "resolve-uri: invalid URI (base=NoStylesheetBaseURI, relative=blob:").

Client-side test case using xsl:import with a blob URL is at (relevant output is also only visible if the the developer console is opened up).

Actions #1

Updated by Norm Tovey-Walsh about 2 years ago

  • Priority changed from Normal to High

Bumping the priority based on feedback from Martin

Actions #3

Updated by Norm Tovey-Walsh about 2 years ago

This turned out to be a completely different problem than I initially imagined. The browser is perfectly happy to resolve data: and blob: URIs, which I guess I should have realized. What's going on in SaxonJS is that we fail to recognize them as absolute URIs, attempt to resolve them against a base URI, and wind up with something unusable.

Simply observing that data: and blob: URIs are absolute seems to resolve the problem.

Actions #4

Updated by Norm Tovey-Walsh about 2 years ago

  • Status changed from New to In Progress
  • Assignee set to Norm Tovey-Walsh
Actions #5

Updated by Norm Tovey-Walsh about 2 years ago

  • Status changed from In Progress to Resolved
Actions #6

Updated by Debbie Lockett almost 2 years ago

  • Sprint/Milestone set to SaxonJS 2.5
  • Applies to JS Branch Trunk added
  • Fix Committed on JS Branch 2, Trunk added
Actions #7

Updated by Norm Tovey-Walsh almost 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to SaxonJS 2.5

Fixed in SaxonJS 2.5.

Please register to edit this issue

Also available in: Atom PDF Tracking page