Project

Profile

Help

Feature #5083

closed

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

Added by Martin Honnen over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
High
Category:
-
Sprint/Milestone:
Start date:
2021-09-07
Due date:
% Done:

100%

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

Description

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 https://martin-honnen.github.io/xslt/2021/blobTest1WithSaxonJS.html (need to open F12/developer tools to see the error message about e.g. "resolve-uri: invalid URI (base=NoStylesheetBaseURI, relative=blob:https://martin-honnen.github.io/c90a3603-af63-424d-a6ec-059293e007e2)").

Client-side test case using xsl:import with a blob URL is at https://martin-honnen.github.io/xslt/2021/blobTest6.html (relevant output is also only visible if the the developer console is opened up).

Please register to edit this issue

Also available in: Atom PDF Tracking page