Rebasing static asset URLs#303
Open
namedgraph wants to merge 3 commits into
Open
Conversation
Static asset URLs (CSS, JS, img, translations.rdf catalog keys) were
being resolved against $ac:contextUri — the request-derived URL — which
in proxied multi-dataspace setups can carry the wrong host and render
links pointing at the root dataspace instead of the current one.
Switch every `resolve-uri('static/...', $ac:contextUri)` to use
$lapp:origin (the matched application's configured origin), guard the
Style template with a $lapp:origin predicate, and re-emit the
Web-Client-imported CSS explicitly so the override no longer chains
through xsl:apply-imports.
Also collapse the ontology location-mapping catalog keys: the first
argument is already an absolute URI, so resolve-uri(...) was a no-op
wrapper — replaced with a plain xs:anyURI(...) cast.
SKOS package layout.xsl gets the same treatment.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous $ac:contextUri → $lapp:origin sweep introduced $lapp:origin references into nine stylesheets that didn't declare the lapp prefix or its entity, causing a build-time "No namespace binding for prefix 'lapp'" XPath static error. Add the lapp ENTITY in the DOCTYPE and xmlns:lapp on xsl:stylesheet for each affected file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous $ac:contextUri → $lapp:origin sweep broke client.xsl compilation: $lapp:origin is a server-side writer-set parameter and has no client-side declaration, yielding XPST0008 in Saxon-JS. Passing the value through Saxon-JS stylesheetParams would also snapshot it at page-load and go stale on in-page tab navigation. Replace $lapp:origin references with a 0-arg lapp:origin() function following the existing ldh:request-uri() paired-definition pattern: - Server-side (imports/default.xsl, use-when SAXON): returns the $lapp:origin param set by XSLTWriterBase. - Client-side (client/functions.xsl): returns the origin extracted from ldt:base(), which reads the active tab pane's data-base — the per-tab dataspace source of truth that already drives ldt:base() and lapp:application(). Sweep $lapp:origin → lapp:origin() across all stylesheets touched by the prior commits, and add the missing xmlns:lapp declaration to resource.xsl. Co-Authored-By: Claude Opus 4.7 (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.
No description provided.