-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Some glitches encountered November 2024
Thanks for providing this tutorial! I learned a lot, but also encountered some hiccups.
Running on Windows 11.
Trying the Python server:
Running:
.\gradlew pythonServerStart
Reports:
Execution failed for task ':checkPython'.
Cannot run web server without python3.exe
On Windows, I don't think there usually is a python3.exe
I copied python.exe and called it python3.exe
Now the server runs
Creating a symlink also works.
On exercise 2, error message in console:
Uncaught (in promise)
Object { message: "Failed to read JSON input http://localhost:9000/exercises/ex02/ex02.sef.json: XError:Failed to read http://localhost:9000/exercises/ex02/ex02.sef.json(Document fetch failed: http://localhost:9000/exercises/ex02/ex02.sef.json); code:SXJS0006", stack: "J@http://localhost:9000/js/SaxonJS2.rt.js:178:51\ntransform/Z<@http://localhost:9000/js/SaxonJS2.rt.js:1162:444
promise callbacktransform@http://localhost:9000/js/SaxonJS2.rt.js:1162:404
window.onload@http://localhost:9000/exercises/ex02/index.html:8:13
EventHandlerNonNull@http://localhost:9000/exercises/ex02/index.html:7:3
", name: "XError", code: "SXJS0006" }
The SEF file is there, but apparently, it is out of date. When I recompile, the exercise runs fine.
(the web server reports this unenlightening error:
OSError: [WinError 193] %1 is not a valid Win32 application
but in the stack trace I see this:
recompile subprocess.run(["./gradlew", "-Pxsl=%s" % relpath, "eej"]))
Running node server:
(As I initially didn't see a way around the windows problem, I switched to node)
Starting the node server:
Error:
Cannot find module 'express'
Installed that.
The I could start the Node server.
For compilation of the stylesheets, tried to run:
.\gradlew -Pxsl=exercises/ex03/ex03.xsl node_xslt3
error
- What went wrong:
Task '.xsl' not found in root project 'SaxonJS-Tutorial-2021'. Some candidates are: 'xslt'.
Running the equivalent node command:
node node_modules/xslt3/xslt3.js -xsl:exercises/ex03/ex03.xsl -export:exercises/ex03/ex03.sef.json -nogo -ns:##html5
also gave an error:
Error: Cannot find module 'D:\even\SaxonJS-Tutorial-2021-main\SaxonJS-Tutorial-2021-main\node_modules\xslt3\xslt3.js'
(weird, because it is there)
Then I installed xslt3 using
npm install xslt3
The gradle command now returned:
Error: Cannot find module 'D:\even\SaxonJS-Tutorial-2021-main\SaxonJS-Tutorial-2021-main\node\node_modules\xslt3\xslt3.js'
(note the extra 'node' in the path when compared with the previous error)
But now I could run the compilation without gradle:
node node_modules/xslt3/xslt3.js -xsl:exercises/ex03/ex03.xsl -export:exercises/ex03/ex03.sef.json -nogo -ns:##html5
(at least, in Windows cmd, not in PowerShell, which requires quotation marks like this: -ns:"##html5")
Other remarks
Firefox consistently reports an error on reading the SEF's
XML Parsing Error: not well-formed
Location: http://localhost:9000/exercises/ex08/ex08.sef.json
Line Number 1, Column 1: ex08.sef.json:1:1
But it does execute them.
There is a surplus bracket on slide 37: ixsl:get(ixsl:event(),'target.value'))