Drop the EXPath File module dependency (read JMX token via unparsed-text)#2
Merged
Merged
Conversation
…text) modules/app.xqm imported http://expath.org/ns/file (EXPath File module) solely to read the JMX servlet token file ($EXIST_HOME/data/jmxservlet.token) via file:exists / file:read-text. That module is not bundled with eXist 7 (see eXist-db/exist#6257), so the whole module failed to load with XQST0059, breaking the dashboard UI (view.xq -> app.xqm). Replace the two file: calls with the W3C fn:unparsed-text family over a file:// URI, which eXist honors natively for filesystem reads: file:exists($p) -> unparsed-text-available("file://" || $p) file:read-text($p) -> unparsed-text("file://" || $p) No behavior change to token parsing; drops the optional dependency so the dashboard runs on stock eXist 7 without the unmerged exist#6257. Verified: app.xqm now loads (the XQST0059 / expath.org/ns/file error is gone) and the token file reads correctly via unparsed-text. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[This PR was co-authored with Claude Code. -Joe]
Drop the EXPath File module dependency (read JMX token via
unparsed-text)modules/app.xqmimported the EXPath File module (http://expath.org/ns/file) solely to read the JMX servlet token file ($EXIST_HOME/data/jmxservlet.token) viafile:exists/file:read-text. That module isn't bundled with eXist 7 (eXist-db/exist#6257 is the pending addition), so on eXist 7 the whole module failed to load withXQST0059, breaking the dashboard UI (view.xq → app.xqm).Change
Replace the two
file:calls with the W3Cfn:unparsed-textfamily over afile://URI, which eXist honors natively for filesystem reads:Token-parsing logic is unchanged. The usage was small (two call sites), so this drops the dependency entirely rather than taking on
eXist-db/exist-fileas an interim package. The dashboard now runs on stock eXist 7 without the unmerged eXist-db/exist#6257.Verification
app.xqmnow loads (theXQST0059/expath.org/ns/fileerror is gone) andunparsed-text("file://" || $token-file)reads the token file correctly (confirmed against$EXIST_HOME/data/jmxservlet.token).Heads-up (separate issue, not this PR)
With the EXPath File error cleared, the dashboard UI hits a different pre-existing problem: jinks-templates can't find
templates/base-page.html(the templates dir haspage-content.tpl+pages/but nobase-page.html). Tracked separately — needs investigation into whether that template is missing from the build/source or the extends-target was renamed.