johnlumley / jwiXML

An iXML processor for JavaScript and SaxonJS
MIT License
13 stars 0 forks source link

jwiXML demo (installation?) failure #5

Closed wendellpiez closed 1 year ago

wendellpiez commented 1 year ago

Trying to set up the demo. After downloading the zip and decompressing into a folder, running http-server (Node.js) I load the sample page (current Firefox) and see no action, just the static title, no XML. The Console shows a traceback:

Object { message: "Failed to call method function(a,b){a instanceof Document?(a=Eb(a),a.compile(b),b=a):(a=(new Fb).parse(a instanceof Node?a.textContent:a),a.compile(b),b=a);return b}", stack: "I@http://localhost:8080/saxonJS/SaxonJS2.rt.js:179:51\nh@http://localhost:8080/saxonJS/SaxonJS2.rt.js:1094:83\ncall@http://localhost:8080/saxonJS/SaxonJS2.rt.js:1095:434\nb@http://localhost:8080/saxonJS/SaxonJS2.rt.js:1103:165\na@http://localhost:8080/saxonJS/SaxonJS2.rt.js:1092:180\nifCall/Od@http://localhost:8080/saxonJS/SaxonJS2.rt.js:786:244\ncheck/Od@http://localhost:8080/saxonJS/SaxonJS2.rt.js:763:29\nA@http://localhost:8080/saxonJS/SaxonJS2.rt.js:744:388\nufCall/Od@http://localhost:8080/saxonJS/SaxonJS2.rt.js:815:321\nufCall/Od/R<@http://localhost:8080/saxonJS/SaxonJS2.rt.js:815:298\nufCall/Od@http://localhost:8080/saxonJS/SaxonJS2.rt.js:815:275\nlookup/Od@http://localhost:8080/saxonJS/SaxonJS2.rt.js:790:177\nfn/Od/R<@http://localhost:8080/saxonJS/SaxonJS2.rt.js:777:105\nfn/Od@http://localhost:8080/saxonJS/SaxonJS2.rt.js:777:82\nvalueOf/Le@http://localhost:8080/saxonJS/SaxonJS2.rt.js:523:188\nD/Le/<@http://localhost:8080/saxonJS/SaxonJS2.rt.js:493:528\nD/Le@http://localhost:8080/saxonJS/SaxonJS2.rt.js:493:501\nelem/Le@http://localhost:8080/saxonJS/SaxonJS2.rt.js:514:283\npush@http://localhost:8080/saxonJS/SaxonJS2.rt.js:523:401\nO/Od@http://localhost:8080/saxonJS/SaxonJS2.rt.js:745:60\nb/Od/w/Od<@http://localhost:8080/saxonJS/SaxonJS2.rt.js:733:225\nVa@http://localhost:8080/saxonJS/SaxonJS2.rt.js:10:299\nWa/this.next@http://localhost:8080/saxonJS/SaxonJS2.rt.js:11:91\nuc.prototype.next@http://localhost:8080/saxonJS/SaxonJS2.rt.js:317:288\nca.forEachItem@http://localhost:8080/saxonJS/SaxonJS2.rt.js:306:380\na@http://localhost:8080/saxonJS/SaxonJS2.rt.js:363:377\nM@http://localhost:8080/saxonJS/SaxonJS2.rt.js:741:193\nresultDoc/Od@http://localhost:8080/saxonJS/SaxonJS2.rt.js:806:220\npush@http://localhost:8080/saxonJS/SaxonJS2.rt.js:523:496\ng@http://localhost:8080/saxonJS/SaxonJS2.rt.js:1148:250\nm@http://localhost:8080/saxonJS/SaxonJS2.rt.js:1152:212\ntransform@http://localhost:8080/saxonJS/SaxonJS2.rt.js:1172:341\nonload@http://localhost:8080/sample/jwiXML.sample.xhtml:1:9\n", name: "XError", code: "SXJS0007", xsltLineNr: "13", xsltModule: "jwiXML.processor.xsl" } SaxonJS2.rt.js:524:81

(A not-dissimilar error in Chrome mentions an "I" function also.)

What am I doing wrong? (I have tested and the scripts appear to be loading. Using http-server I have had success delivering SaxonJS in the past.) Glad to receive instruction, also please redirect me if this is not an appropriate channel. Thanks!

johnlumley commented 1 year ago

May be a few days before I can look into this…. My tests some 6+ months ago would have been with an Apache server…

Sent from my iPad

On 21 Aug 2023, at 23:09, Wendell Piez @.***> wrote:

 Trying to set up the demo. After downloading the zip and decompressing into a folder, running http-server (Node.js) I load the sample page (current Firefox) and see no action, just the static title, no XML. The Console shows a traceback:

Object { message: "Failed to call method function(a,b){a instanceof Document?(a=Eb(a),a.compile(b),b=a):(a=(new Fb).parse(a instanceof Node?a.textContent:a),a.compile(b),b=a);return b}", stack: @.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.**@*.***://localhost:8080/sample/jwiXML.sample.xhtml:1:9\n", name: "XError", code: "SXJS0007", xsltLineNr: "13", xsltModule: "jwiXML.processor.xsl" } SaxonJS2.rt.js:524:81

(A not-dissimilar error in Chrome mentions an "I" function also.)

What am I doing wrong? (I have tested and the scripts appear to be loading. Using http-server I have had success delivering SaxonJS in the past.) Glad to receive instruction, also please redirect me if this is not an appropriate channel. Thanks!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

wendellpiez commented 1 year ago

May try that, thanks for the tip. Meanwhile have a great August --

johnlumley commented 1 year ago

Agreed - there is a problem - will track down. (Note that the workbench is still working.... so it probably is some case where I haven't recompiled the source XSLT, probably because the API has changed)

wendellpiez commented 1 year ago

Thanks JL, yes the workbench is working fine, that's how I was able to get so far with my grammar. :grin: (Well except for the broken links for a few of the examples. Not sure that is related though. Try an XPath example...?)

johnlumley commented 1 year ago

Should be OK now (I think) - do let me know. Have added the LICENCE to the zip. Sorry for taking so long - needed to sort out between multiple experimental versions.

wendellpiez commented 1 year ago

Timing is perfect as I have more examples -- see

https://github.com/usnistgov/ixml-breadboard/tree/main

with examples being worked in the ixml directory.

More to come, thankyou @johnlumley

btw have you tried the XPath tests lately? Those were among my issues. I am especially interested in parsing XPath (and near-XPath), potentially based on the work here. 🚀

wendellpiez commented 1 year ago

Let's close, everything is working fine.