HTML base tag ignored in stylesheetLocation and sourceLocation
The following bug was not present in Saxon-JS 1.0.0; but appears in Saxon-JS 1.0.1.
As reported by a user:
with the new version it appears to ignore the tag reference in the HTML page so I have to change all my previous code to use absolute paths e.g. I changed to start with ‘/’
Previously, I had used the html base tag to establish this context
Relative URIs supplied for stylesheetLocation or sourceLocation should be resolved against the URI of the HTML page. However Saxon-JS ignores any tag used in an HTML page, so the base URI we resolve against is incorrect.
Rather than using window.location.toString() we should use window.document.baseURI
Note that previously (in Saxon 1.0.0) we did not resolve the URI ourselves, but rather passed a relative URI directly to the XMLHttpRequest.open() call - which handled the resolving correctly in this case.
#3 Updated by Debbie Lockett almost 2 years ago
- Status changed from In Progress to Resolved
- Fix Committed on JS Branch 1.0, Trunk added
Also made the same change (to use window.document.baseURI rather than window.location.toString()) for the URI stored in context.fixed.htmlURI
Bug fix committed on the 1.0 and trunk branches.
Please register to edit this issue