Mount end-user XSLT overrides into the LinkedDataHub container - #14
Merged
Conversation
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>
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.
Problem
Person pages were rendering the raw n-ary
org:Membership/time:Interval/time:Instantplumbing blocks instead of suppressing them (see the reported screenshot). Thebs2:Rowsuppression infiles/overrides.xslwas correct — it just never ran.Root cause: the four custom end-user stylesheets (
files/layout.xsl,overrides.xsl,client.xsland its compiled SEF) are documented inCLAUDE.mdas 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 singledocker-compose.ymlwas 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
linkeddatahubservice indocker-compose.override.yml(the linkeddatahub.com pattern; targets exactly as CLAUDE.md documents):files/layout.xslstatic/xsl/layout.xsl(end-userac:stylesheettarget)files/overrides.xslstatic/xsl/overrides.xsl(:ro)files/client.xslstatic/com/ltlod/xsl/client.xsl(:ro)files/client.xsl.sef.jsonstatic/com/ltlod/xsl/client.xsl.sef.json(:ro)layout.xslstays writable because LDH's InstallPackage endpoint appends to it; the rest are read-only.Verification
Rebuilt the SEF (
make sef) — it was stale relative tooverrides.xsl— and recreated the container. On/persons/12253/(Jaroslav Narkevič):com/ltlod/xsl/client.xsl.sef.json(was the stock SEF)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