From 365799ec13f0532183c08015c302b48cd7ba7bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martynas=20Jusevi=C4=8Dius?= Date: Thu, 17 Sep 2026 00:08:48 +0200 Subject: [PATCH 1/3] The taxonomy package's aside rule contributes through ldh:RowHook instead of winning the walk. The platform split ldh:RenderRow into a sealed walk and the open leaf mode ldh:RowHook it asks at every element, so the rule that reveals the open concept moves to that mode and drops the priority it needed to outrank the walk. The README now describes where a package stylesheet is composed - right above hooks.xsl, the open modes' module, and below everything else - and what a rule in each open mode owes. Co-Authored-By: Claude Fable 5.1 --- packages/README.md | 39 ++++++++++++++++++++++++------- packages/editor/taxonomy/skos.xsl | 11 +++++---- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/packages/README.md b/packages/README.md index 962080c..52ef452 100644 --- a/packages/README.md +++ b/packages/README.md @@ -88,19 +88,41 @@ Use `ldh:view` for forward relationships (resource has property) or `ldh:inverse ### 3. XSLT Stylesheet (named by `ac:stylesheet`) -XSLT templates using system modes to override default rendering: +XSLT template rules in the platform's **open modes**: ```xsl - + - - - + + + + + ``` -Available system modes include `ac:*` (Web-Client component modes named after the design system's components), `ldh:*` (LinkedDataHub components) and `xhtml:*` (XHTML elements). +The package stylesheet is composed into the platform's import tree right above `hooks.xsl`, the module +that declares the open modes and their generic fallbacks, and below everything else. Import precedence +beats template priority, so that position is the contract: a package rule outranks a fallback in an open +mode whatever the priorities, and loses to any rule in a sealed mode whatever its own priority. A package +cannot replace the page head, the content body, a typed rule or a global - those are sealed by +precedence, not by policy. + +An open mode is a leaf: it renders or contributes for one node and carries no control flow. The open +modes, with what a rule in each one owes: + +| Mode | What it renders | A package rule | +|---|---|---| +| `ldh:TreeNode` | one tree node | replaces the fallback, or decorates it with `xsl:next-match` | +| `ac:PropertyEditor` | one resource's property list, or one statement row | replaces or decorates; an empty rule hides | +| `ldh:ContentColumn` | the navigation slot beside the content body | fills it; nothing to inherit | +| `ldh:TreeChildrenLoad` | (client) the children fetch for one tree node | replaces | +| `ldh:RowHook` | (client) factories of deferred work for one rendered row | contributes; nothing to inherit | + +`hooks.xsl` in the platform sources carries the same table beside the declarations. The value-leaf modes +(`ac:FormControl`, `ac:PropertyListValue`, the unnamed mode) and the component modes (`ldh:Modal`, +`ac:FieldShell`...) are sealed in this version. ## Installing Packages @@ -140,7 +162,8 @@ From the next request onwards, the server resolves it: an `owl:imports` of the namespace ontology. Its classes, constructors, constraints and views become available on the `ns` endpoint and in the UI. 3. **Composes the package stylesheet** (`ac:stylesheet`) into the application stylesheet by - appending an `xsl:import` after the existing ones, so package templates override the system's. + inserting an `xsl:import` right after the platform's `hooks.xsl` import, so package templates + override the open modes' fallbacks and nothing else (see the stylesheet section above). Packages are applied in the order of their URIs. One that declares only an ontology, or only a stylesheet, contributes only that; one whose description cannot be resolved is skipped. If the @@ -179,6 +202,6 @@ List of available packages can be found in the [LinkedDataHub-Apps](https://gith - Packages are **declarative only** (RDF + XSLT, no Java code) - Package ontologies use `owl:imports` (handled automatically by Jena) -- Package stylesheets are composed into the application stylesheet with `xsl:import`, in memory, per dataspace +- Package stylesheets are composed into the application stylesheet with `xsl:import` at the `hooks.xsl` marker, in memory, per dataspace - Property views (`ldh:view`/`ldh:inverseView`) are separate from XSLT overrides - Both mechanisms work independently and complement each other diff --git a/packages/editor/taxonomy/skos.xsl b/packages/editor/taxonomy/skos.xsl index 9182081..7a1b958 100644 --- a/packages/editor/taxonomy/skos.xsl +++ b/packages/editor/taxonomy/skos.xsl @@ -148,16 +148,17 @@ exclude-result-prefixes="#all"> The tree roots at the scheme, so on a concept page it must open the path down to that concept or the reader is left at the top of a taxonomy with no idea where they are. - Triggered from ldh:RenderRow, which the platform already applies to every direct child of - .content-body after the pane is in the DOM - on a direct load AND on a client-side navigation - alike. That is the whole reason no new platform hook was needed, and why there is one + Triggered through ldh:RowHook, the open mode the platform's ldh:RenderRow walk applies to every + element under .content-body after the pane is in the DOM - on a direct load AND on a client-side + navigation alike. That is the whole reason no new platform hook was needed, and why there is one implementation rather than a synchronous server walk beside an asynchronous client one: this - mode is the only place both paths meet after the markup exists. + mode is the only place both paths meet after the markup exists. The walk itself is sealed; this + rule only returns work for the aside and never descends, so nothing under it is skipped. The mode's contract is a FACTORY, not work: it is evaluated inside a non-updating variable binding and the factories are invoked later inside ixsl:promise, which is also what gives ixsl:http-request the active promise it requires. --> - +