Bug #2888

Updated by Debbie Lockett almost 7 years ago

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. 9.8 branch.