From 181f60f9f6d286517f1fdf123d5bfffb42bec80b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martynas=20Jusevi=C4=8Dius?= Date: Sun, 10 May 2026 20:52:31 +0200 Subject: [PATCH 1/2] Move ldh:view block injection client-side under Saxon-JS The SSR-only wrapper template (resource.xsl:605) injected view blocks synchronously via document() against the ?ns SPARQL endpoint, which worked under SAXON but was compiled out of the Saxon-JS SEF. Initial load painted the wrappers correctly, but client.xsl:537 replaced the SSR document-body with a fresh Saxon-JS render that lacked them, and view.xsl:62 had nothing to hydrate. - resource.xsl: drop the SAXON-only wrapper template; add a Saxon-JS-only bs2:Row template at priority 0.7 that always wraps non-typed-block resources in outer div + inner div.span12 around next-match output, so client-side injection has a host whose @about ends in #this for primary topics. Excludes types handled by resource.xsl:463 to avoid injecting spurious nesting into View/Object/Query/Chart chains. - layout.xsl: drop unused $forward-view-query and $inverse-view-query. - client/block.xsl: add combined $view-query (forward + inverse via UNION); amend default mode='ldh:RenderRow' template to fan out per wrapper (xsl:for-each over the inner typed-block selector); add ldh:view-blocks-{self,query,fetch,render}-thunk mirroring the view.xsl:107-147 pattern. Render step calls apply-templates mode='bs2:Row' on the loaded View resource - same call the deleted SSR code used - so the injected HTML matches resource.xsl:463 output byte-for-byte. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../xsl/bootstrap/2.3.2/client/block.xsl | 157 +++++++++++++++++- .../xsl/bootstrap/2.3.2/layout.xsl | 32 ---- .../xsl/bootstrap/2.3.2/resource.xsl | 76 ++------- 3 files changed, 173 insertions(+), 92 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl index 4cfee9839..f9438e57b 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl @@ -13,6 +13,7 @@ + @@ -37,6 +38,7 @@ xmlns:ldt="&ldt;" xmlns:sioc="&sioc;" xmlns:sd="&sd;" xmlns:sp="&sp;" +xmlns:srx="&srx;" xmlns:spin="&spin;" xmlns:dct="&dct;" xmlns:bs2="http://graphity.org/xsl/bootstrap/2.3.2" @@ -111,6 +113,32 @@ exclude-result-prefixes="#all" ]]> + + + + PREFIX ldh: + + SELECT DISTINCT ?block + WHERE { + { + ?property ldh:view ?block . + { ?property rdfs:domain ?type } + UNION + { ?property rdfs:subPropertyOf+/rdfs:domain ?type } + } + UNION + { + ?property ldh:inverseView ?block . + { ?property rdfs:range ?type } + UNION + { ?property rdfs:subPropertyOf+/rdfs:range ?type } + } + } + ]]> + + + @@ -124,9 +152,34 @@ exclude-result-prefixes="#all" - + + + + + + + + + + + @@ -470,7 +523,107 @@ exclude-result-prefixes="#all" ) "/> - + + + + + + + ldh:view-blocks-self-thunk + + + + + + + + ldh:view-blocks-query-thunk + + + + + + + + + + ldh:view-blocks-fetch-thunk + + + + + + + + + + + + + + + + + + + + + + + + + + + + ldh:view-blocks-render-thunk + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl index f3ed49abe..2b59df71a 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl @@ -160,38 +160,6 @@ exclude-result-prefixes="#all"> ]]> - - - PREFIX ldh: - - SELECT DISTINCT ?block - WHERE - { - ?property ldh:view ?block . - { ?property rdfs:domain $domain } - UNION - { ?property rdfs:subPropertyOf+/rdfs:domain $domain } - } - ]]> - - - - - PREFIX ldh: - - SELECT DISTINCT ?block - WHERE - { - ?property ldh:inverseView ?block . - { ?property rdfs:range $range } - UNION - { ?property rdfs:subPropertyOf+/rdfs:range $range } - } - ]]> - - diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl index 18c9501d3..bf69bd51e 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl @@ -601,77 +601,37 @@ extension-element-prefixes="ixsl" - - - + + - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
-
-
- + +
+ + + + + + + + + + +
- + - - +
+
From 2a6cd777418692b06824743567473e1c928b8c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martynas=20Jusevi=C4=8Dius?= Date: Sun, 10 May 2026 20:59:48 +0200 Subject: [PATCH 2/2] Comment --- .../com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl index bf69bd51e..232987f6d 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl @@ -602,6 +602,7 @@ extension-element-prefixes="ixsl" +