Project

Profile

Help

Bug #2888

closed

Static base-uri for in-browser exported stylesheets.

Added by John Lumley over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2016-08-18
Due date:
% Done:

100%

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

Description

Currently the export format contains baseUri="path" attributes which are used to recover the static base URI at run time. These refer to the location of the defining stylesheet at compile time. In cases where the exported stylesheet is being run in browser under Saxon-JS, this is inappropriate, as usually the export is loaded via HTTP and far removed from its original location.

Under Saxon-JS Context.fixed now has three additional properties which are set during initialisation:

  • staticBaseURI - which is the absolute URI of the export file loaded via the stylesheetLocation option. This is now used to recover 'stylesheet-relative' resources e.g. @select="doc('myResources.xml')"@, assuming any HTTP server URL resolution is configured suitably.

  • htmlURI - the absolute URI of the html document that invoked Saxon-JS

  • javascriptURI - the absolute URI of the javascript (i.e. Saxon-JS). This is used to dynamically load additional resources, such as the regular expression categories.

In execution outside the browser, static base URI is still recovered from attributes in the export file.

Changes committed to the Saxon-JS code.

Please register to edit this issue

Also available in: Atom PDF Tracking page