Skip to content

Rebasing static asset URLs#303

Open
namedgraph wants to merge 3 commits into
developfrom
rf-rebasing-static-asset-urls
Open

Rebasing static asset URLs#303
namedgraph wants to merge 3 commits into
developfrom
rf-rebasing-static-asset-urls

Conversation

@namedgraph
Copy link
Copy Markdown
Member

No description provided.

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>
@namedgraph namedgraph changed the base branch from master to develop May 20, 2026 19:49
namedgraph and others added 2 commits May 21, 2026 06:15
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant