Skip to content

Mount end-user XSLT overrides into the LinkedDataHub container - #14

Merged
namedgraph merged 3 commits into
masterfrom
fix/mount-xslt-overrides
Jul 25, 2026
Merged

Mount end-user XSLT overrides into the LinkedDataHub container#14
namedgraph merged 3 commits into
masterfrom
fix/mount-xslt-overrides

Conversation

@namedgraph

Copy link
Copy Markdown
Member

Problem

Person pages were rendering the raw n-ary org:Membership / time:Interval / time:Instant plumbing blocks instead of suppressing them (see the reported screenshot). The bs2:Row suppression in files/overrides.xsl was correct — it just never ran.

Root cause: the four custom end-user stylesheets (files/layout.xsl, overrides.xsl, client.xsl and its compiled SEF) are documented in CLAUDE.md as bind-mounted into the container, but no compose file ever carried the mounts. They existed only in a local working copy and were lost when the single docker-compose.yml was split into a verbatim upstream base + this override (69ba75d). The container therefore served stock LDH stylesheets: no block suppression, and the client bootstrap loaded the stock SEF instead of ours.

Fix

Add the four bind mounts to the linkeddatahub service in docker-compose.override.yml (the linkeddatahub.com pattern; targets exactly as CLAUDE.md documents):

host file container target
files/layout.xsl static/xsl/layout.xsl (end-user ac:stylesheet target)
files/overrides.xsl static/xsl/overrides.xsl (:ro)
files/client.xsl static/com/ltlod/xsl/client.xsl (:ro)
files/client.xsl.sef.json static/com/ltlod/xsl/client.xsl.sef.json (:ro)

layout.xsl stays writable because LDH's InstallPackage endpoint appends to it; the rest are read-only.

Verification

Rebuilt the SEF (make sef) — it was stale relative to overrides.xsl — and recreated the container. On /persons/12253/ (Jaroslav Narkevič):

  • server HTML now references com/ltlod/xsl/client.xsl.sef.json (was the stock SEF)
  • 0 membership/interval block divs (was 78)
  • page size 248 KB → 26 KB

No change to the admin app (mounts target the end-user static/ tree only). The rebuilt SEF is gitignored, as before.

🤖 Generated with Claude Code

namedgraph and others added 3 commits July 25, 2026 11:45
New `ltlod-geo` tool (etl/tools) reprojects the AR spatial models
(gra{apskritis,savivaldybe,seniunija,gyvenamojivietove}, LKS-94/EPSG:3346)
to WGS84 and emits, per admin unit, into a merged-on-load *-geo.trig:

- geo:lat/geo:long representative point (all four levels) — WGS84 Basic Geo,
  what LinkedDataHub's map-marker path keys on.
- gs:asWKT simplified boundary (coarse levels: counties/municipalities/
  elderships) — GeoSPARQL wktLiteral, bare WGS84 lon-lat, Douglas-Peucker
  simplified (~50 m) since LDH does no client-side simplification and the raw
  polygons are ~160 MB. Placed directly on #this so the map feature id is the
  unit URI. Settlements stay point-only (20k detailed polygons too heavy).

Map wiring: :SubUnits (app/ns.ttl) and a new frontpage counties map
(app/root.ttl) use ac:MapMode. files/overrides.xsl drops the bulky WKT literal
from the property-list rendering (kept in the data so the map still draws it).

Also: optional geo:lat/long + gsp:asWKT in the admin-units SHACL shape;
ONTOLOGY-NOTES.md and CLAUDE.md document the vocabulary choice, the EPSG:3346
(Northing, Easting) axis-order gotcha, and the on-#this modeling.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The admin-unit *-geo.trig files are overlays (geo:lat/geo:long/gs:asWKT onto
the entity docs' graphs, merged on load), like alignments.trig — they carry no
per-graph dct:title/foaf:primaryTopic, so the strict validate.sh graph-invariant
check rejects them. Route them through shacl.sh only, same as alignments/photos.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The custom end-user stylesheets (files/layout.xsl, overrides.xsl, client.xsl
and its compiled SEF) were documented in CLAUDE.md as bind-mounted, but no
compose file ever carried the mounts — they were only in a local working copy
and were lost when the single compose was split into a verbatim upstream base
plus this override (69ba75d). The container therefore served stock LDH
stylesheets: the person pages rendered the raw n-ary org:Membership /
time:Interval / time:Instant plumbing blocks instead of suppressing them, and
the client bootstrap loaded the stock SEF rather than ours.

Add the four bind mounts to the linkeddatahub service (the linkeddatahub.com
pattern, targets per CLAUDE.md): layout.xsl over the end-user ac:stylesheet
target static/xsl/layout.xsl, overrides.xsl alongside it, and client.xsl + the
SEF under static/com/ltlod/xsl/. layout.xsl stays writable (InstallPackage
appends to it); the rest are :ro.

Verified on /persons/12253/: server HTML now references
com/ltlod/xsl/client.xsl.sef.json and emits 0 membership/interval blocks
(was 78), the page shrinking from 248 KB to 26 KB.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@namedgraph
namedgraph merged commit d3d0555 into master Jul 25, 2026
2 checks passed
@namedgraph
namedgraph deleted the fix/mount-xslt-overrides branch July 25, 2026 09:17
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