Maintenance: Planio will be observing a scheduled maintenance window this Tuesday, November 5, 2024 from 03:00 UTC until 06:30 UTC to perform urgent network maintenance in our primary data center. Your Planio account will be unavailable during this maintenance window.
Feature #5083
closedSaxon-JS in the browser should support data: and blob: URLs
100%
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).
Updated by Norm Tovey-Walsh over 2 years ago
- Priority changed from Normal to High
Bumping the priority based on feedback from Martin
Updated by Norm Tovey-Walsh over 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.
Updated by Norm Tovey-Walsh over 2 years ago
- Status changed from New to In Progress
- Assignee set to Norm Tovey-Walsh
Updated by Norm Tovey-Walsh over 2 years ago
- Status changed from In Progress to Resolved
Updated by Debbie Lockett about 2 years ago
- Sprint/Milestone set to SaxonJS 2.5
- Applies to JS Branch Trunk added
- Fix Committed on JS Branch 2, Trunk added
Updated by Norm Tovey-Walsh about 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