From 58726895875d9fc2f67ff4b1cc801572f668a08a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martynas=20Jusevi=C4=8Dius?= Date: Wed, 21 Oct 2026 11:54:18 +0200 Subject: [PATCH] AGENTS.md: a view lists the resources its query's first variable binds A view's spin:query is a stored SELECT that the client wraps into a DESCRIBE of the query's first variable (view.xsl, ldh:first-var-name and ldh:wrap-describe); a first variable that binds values describes nothing, and the view shows its view-no-resources error. The guide said views were SELECT/CONSTRUCT/DESCRIBE blocks rendered as lists, tables, grids, charts, maps or a graph, which reads as if any query, and charts, were views. Charts, ldh:ResultSetChart, get their own line. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index fe00b48a9..5374522d9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -85,7 +85,8 @@ Outbound `SERVICE` and `LOAD` — from the triplestore and from the platform ali - Documents carry ordered **content blocks**, attached by RDF container membership properties — `rdf:_1`, `rdf:_2`, … on the document resource. Reordering a block rewrites those predicates. - Only `ldh:Object` (an embedded RDF resource view, `rdf:value` naming the resource) and `ldh:XHTML` (rich text, `rdf:value` an `rdf:XMLLiteral`) are permitted as block values; anything else must be wrapped in an `ldh:Object`. -- **Views** (`ldh:View`) are SPARQL-driven blocks (`SELECT`/`CONSTRUCT`/`DESCRIBE`) rendered as lists, tables, grids, charts, maps, or a graph. +- **Views** (`ldh:View`) list resources. A view's `spin:query` is a stored `SELECT` (`sp:Select`), which the client wraps into a `DESCRIBE` of the query's **first variable** and renders in the view's `ac:mode`: a list, table, grid, map, or a graph. That variable must therefore bind resources (`SELECT ?item WHERE { … }`): one that binds values — a title, a number, a computed `(YEAR(NOW()) AS ?year)` — describes nothing, and the view shows an error instead of results. To show values, use a chart. +- **Charts** (`ldh:ResultSetChart`) plot a stored `SELECT`'s values: `ldh:categoryVarName` names the category variable and each `ldh:seriesVarName` a series, in `ldh:chartType`'s form. - Forms and validation are ontology-driven (SPIN constructors + SHACL shapes), so instance data is shaped by the app's ontology rather than hardcoded schemas. - **Imports** are documents too: an `ldh:CSVImport` or `ldh:RDFImport` resource with `ldh:file` (the source), `spin:query` (the transformation) and, for CSV, `ldh:delimiter`. Creating one submits the ingest; the source URIs are validated before being fetched. - **Packages** bundle an ontology with an optional stylesheet. An application imports one by declaring a single ` ldh:import ` triple in its settings — the declaration *is* the installation. It takes effect on the next request, with no restart.