Project

Profile

Help

Bug #4103

closed

Saxon-JS dynamic loading errors > it won't run on Tizen OS in a webapp browser (on Smartwatches and TVs)

Added by Gary Cornelius almost 6 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Internals
Sprint/Milestone:
-
Start date:
2019-01-19
Due date:
% Done:

100%

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

Description

Hi Guys,

Thanks for creating the Saxon-JS product which is a great product! Although I have had a lot of success running it in conventional browsers I wanted to report Saxon-JS failing to run in the Tizen OS (linux based) web browser that is used in many of the leading TVs and Smartwatches.

It seems it should run as Tizen uses a webkit based browser very similar to Chrome but it fails as the file loading is not working to pull in the additional files ( 'XPathJS.min.js', 'functions.json', and 'categories.json').

When I log-to-console the base url from a standalone APP on a smartwatch, TV or mobile I usually get something like ‘file:///’ rather than ‘/’ as the APPS run on the device (rather than client/server on a webserver or some kind of companion app). I think the 'browser magic at work here' in Saxon-JS fails in the assumptions it makes about how to find and load libraries in this context.

Other JavaScript libraries I use in this environment such as those that use require.js seem to load all their dependencies OK and I have had a several attempts at changing the SaxonJS code but haven't manage to fix the problem. I wonder if it would be possible to get a version of SaxonJS.js to test with the 'XPathJS.min.js', 'functions.json', and 'categories.json' external loads all in the same file. I think this could help isolate if the dynamic loading is the only major issue for these 'standalone apps'.

Typically I am seeing 'SXJS0006' errors in the browser console debugging for the watch/TV e.g.

SaxonJS.js:108 Uncaught XError {name: "XError", message: ": file:///js/watch.sef.xml", code: "SXJS0006", stack: "Error↵ at new XError (file:///js/SaxonJS.js:512…pRequest.xhr.onload (file:///js/SaxonJS.js:52:34)"} code: "SXJS0006" message: ": file:///js/watch.sef.xml" name: "XError" stack: "Error↵ at new XError (file:///js/SaxonJS.js:5127:19)↵ at XMLHttpRequest.xhr.onload (file:///js/SaxonJS.js:52:34)" proto:Error

In addition to changing the code I also tried loading the modules ( 'XPathJS.min.js', 'functions.json', and 'categories.json' ) into the browser with require.js in JavaScript before SaxonJS runs but the logic in SaxonJS continues to identify a loading error and bombs out.

I hope you can provide some help or pointers in how I can resolve this problem? We would like to use the Saxon-JS/SVG integration to help us create a range of analogue clock faces on smart watches tailored for those with dementia along the lines https://dementia.watch/ and resolving this issue would be a great help for us. I think the JS/SVG integration is really useful in these types of environments where screen sizes change and it would be great to have this work.

Kindest Regards Gary

Gary Cornelius Solution Architect

Rapport Network CIC Registered in Scotland: SC458540

Assisted living technology for frailty and dementia.

www.rapport.net


Related issues

Has duplicate SaxonJS - Feature #4492: Saxon-JS cannot find '/lib/xpath/XPathJS.min.js' dependency running on some web browsersDuplicateDebbie Lockett2020-03-21

Actions

Please register to edit this issue

Also available in: Atom PDF Tracking page