Skip to content

Develop - #60

Open
namedgraph wants to merge 30 commits into
masterfrom
develop
Open

Develop#60
namedgraph wants to merge 30 commits into
masterfrom
develop

Conversation

@namedgraph

Copy link
Copy Markdown
Member

No description provided.

namedgraph and others added 30 commits August 28, 2026 17:22
- Line items table on order pages via forward ldh:view (detail gallery)
- Order status (OrderDelivered/OrderProcessing/OrderProblem) derived
  from shipped vs required date; shipped date and freight re-emitted
- Line item extended prices (schema:totalPrice) computed from the
  existing quantity/unitPrice/discount columns
- Orders gallery first on the container page, newest-first, with
  customer/broker/date/status columns; narrative blocks rewritten;
  buggy sales-by-region chart (duplicate ldh:seriesVarName) removed
- Inverse views upgraded to TableMode with richer columns; new
  "Orders shipped by this shipper" panel; showWhenEmpty false
- KPI row (orders/revenue/avg order value) on the root dashboard
- Fix unbound ?deliveryLocation triple in orders.rq

The source CSVs stay stock Northwind - no orderTotal or productName
columns are added. An order total is the sum of its line items and a
product name lives in products.csv, so neither belongs in the source
data; the row-at-a-time importer cannot aggregate or join, but that is
a constraint to design around rather than to denormalise away.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C17WzuUXBuyAxZ3nQASCNg
Page structure and copy:
- Drop the frontpage block advertising LinkedDataHub's features and the
  low-code build story; an app does not explain its own toolchain
- Lead the dashboard with the monthly sales trend instead of a two-value
  table stretched over the 400px chart canvas
- Record lists come before analytics in each container, so a section opens
  on its data; narrative blocks run between sections throughout
- Give the four reference containers (suppliers, shippers, regions,
  territories) the intros the others already had
- Drop the revenue-by-category chart duplicated in products.ttl; it belongs
  to categories.ttl

Labelling:
- dct:title on every ldh:Object block. Without it the block heading renders
  the fragment identifier, so pages showed "kpi-block", "select-suppliers"
- Northwind's own vocabulary in the ontology: Sales rep (not Broker),
  Reports to (not Sponsor), Territory, Region, Company name, Required by
- Use .ldh-section for section headers; page-header/lead are Bootstrap 2
  leftovers with no rules in the current design system

Correctness:
- Revenue charts are now net of schema:discount. They summed quantity x price
  and overstated by 6.7% (1,297,141 gross against 1,215,813 net), so no chart
  reconciled with the order totals
- No hardcoded counts in prose. "all 830 orders" was also wrong: 19 rows are
  dropped at import because shipPostalCode is empty and the mapping requires it
- Exclude the final, incomplete month from the trend. The data stops on
  1998-05-06, which rendered as a collapse rather than a truncated month; the
  cutoff is derived from MAX(?orderDate), not pinned to a date
- Order-scoped schema:totalPrice is no longer required by any query, following
  its removal from the import mapping

Charts:
- Add revenue by carrier to Orders, the first chart here with multiple series.
  Each ldh:seriesVarName names its own measure column, so the query pivots with
  conditional aggregation; the removed sales-by-region chart passed a label
  column plus a value column, which is why it never rendered

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C17WzuUXBuyAxZ3nQASCNg
The checker maps every .ttl to <path minus .ttl>/, which is right for
containers but wrong for root.ttl: install.sh PUTs it at $base itself, not
at <dir>/root/. So a relative link in a root.ttl resolved one level too
deep, and demo/northwind-traders/root.ttl's href="orders/" was reported as
demo/northwind-traders/root/orders.ttl.

No root.ttl carried a relative link until now, which is why this went
unnoticed. The link is correct at runtime; the checker's base was not.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C17WzuUXBuyAxZ3nQASCNg
Several schema.org properties were carrying values outside their declared
domains. Each is moved to the term the vocabulary actually provides:

- Order lines are now schema:OrderItem *and* schema:Offer. schema:OrderItem
  has no price properties at all, so schema:price/schema:priceCurrency were
  off-domain; typing the line as the offer that was accepted for it makes
  them legal without splitting the line across two nodes.
- schema:Offer's own schema:price is the price of the offer as a whole, so it
  replaces schema:totalPrice (a Reservation/Ticket property) as the line
  total. The historical unit price moves to a schema:UnitPriceSpecification
  with schema:priceType schema:ListPrice.
- schema:discount is dropped. It is an Order-level property in schema.org,
  and the list price, quantity and line total already pin the per-line rate
  exactly - unlike a stored rate, they cannot disagree with each other.
- Product prices move from schema:Product to a schema:Offer reached through
  schema:offers. A product is not an offer, so this one needs its own node.
- Freight moves off schema:ParcelDelivery, which has no price property, onto
  a schema:DeliveryChargeSpecification reached via schema:priceSpecification
  from a shipping schema:Offer.
- The dispatch date moves off schema:availableFrom (a DeliveryEvent property
  borrowed onto a ParcelDelivery, and meaning "available for pickup" rather
  than "dispatched") onto a real schema:DeliveryEvent hanging off
  schema:deliveryStatus. Orders never dispatched get no event at all.
- schema:orderedItem loses its rdfs:domain/rdfs:range. schema.org allows
  Order|OrderItem -> OrderItem|Product|Service, which a single domain/range
  pair cannot express; the narrowed pair entailed every OrderItem is a
  Product.

Also fixes a pre-existing import bug: shipPostalCode sat in the required BGP
but 19 orders have none, so those orders never entered the graph at all.
Making it OPTIONAL restores them, taking the import from 811 to 830 orders
and revenue from 1,215,812 to 1,265,792 - the canonical Northwind figure.

Consuming queries follow the new structure. The six revenue queries drop
their ?quantity * ?price * (1 - ?discount) recomputation for the materialised
line total, which also settles a 0.1 discrepancy between the carrier chart
and the rest. SelectProductsFromSupplier traverses schema:offers/schema:price.

Verified by running all eleven import queries over the real CSVs and all 28
view and chart queries against the resulting graph: 830 orders, 2155 lines,
freight totalling 64,943, and top product/employee/customer/category all
matching canonical Northwind.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SYifJzEkGsTcJsuB4fGRAc
…and orders pages

The schema.org remodelling added facts the content blocks were not using:
per-order status, a materialised line total, the catalogue price each line
was struck against, and a DeliveryEvent carrying the dispatch date. Four new
charts read them, each with a narrative block ahead of it.

Front page gains a discounting section. Revenue is what was billed; the
ListPrice specification on each line is what was listed, so the gap is what
was given away to win the deal. As a share of gross it runs 3.6%-11.2% and is
decorrelated from volume, which a revenue chart cannot show.

Orders page gains a fulfilment section - average days from order to dispatch,
and the share of orders that beat the date the customer was promised - plus a
late-shipments-by-carrier bar alongside the existing revenue-by-carrier line,
so carriers are compared on reliability as well as volume.

"Orders by country" is dropped to make room. The front page already tells the
geographic story in revenue rather than order count, which is the more useful
of the two measures.

Both rate charts are normalised on purpose. Raw monthly status counts squash
the late series (0-4 a month) against a delivered series climbing 21 to 69,
and the 21 still-open orders are a dataset-cutoff artifact confined to the
last two months - they are filtered out of the on-time and late rates, since
not yet dispatched is not the same as delivered late.

Also corrects the orders intro, which still promised unit prices in the
line-items table; those moved to a nested UnitPriceSpecification.

Verified against the full graph built from the real CSVs: 31 view and chart
queries, none failing to parse, none returning no rows.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SYifJzEkGsTcJsuB4fGRAc
customers.rq required <#postalCode> in its main BGP, but HUNGO — Hungry Owl
All-Night Grocers, Cork — has none. Ireland had no national postcode system
until Eircode in 2015, so a 1996-98 Irish address legitimately has no postal
code; this is correct data, not dirty data.

The row processor emits no triple for an empty cell, so the BGP failed to
match and the entire customer was silently discarded - company, contact,
address, phone and coordinates alike. Its 19 orders kept their
schema:customer link, which then resolved to nothing.

Moving the column to an OPTIONAL, alongside region, fax, lat and long in that
same query, restores the customer and takes dangling customer references from
19 to 0. HUNGO imports with its city and no postal code, rather than a
fabricated placeholder.

Same failure mode as the 19 orders dropped on an empty shipPostalCode. An
audit of all eleven mappings against their CSVs confirms these were the only
two required-but-sometimes-empty columns.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SYifJzEkGsTcJsuB4fGRAc
- command-line-interface: rewritten for the ldh executable — build and
  PATH setup, PKCS12 keystore auth, LDH_* environment defaults, stdout
  and exit code conventions, the command table (#scripts is now
  #commands) and a deprecation note for the bin/ HTTP API scripts
- every page that invoked a script now invokes a command: upload-file,
  create-documents, create-content (--fragment is --uri), import-csv/rdf,
  change-model (create-construct.sh etc. never existed — they are
  ldh admin ontologies add-constructor/add-class/add-property-constraint)
  and the data-model CLI tables
- manage-packages / administration/packages: packages are installed by
  declaring one ldh:import triple, composed at request time; drop the
  Actions dropdown, the packages/install endpoints and the docker-compose
  restart step
- http-api: drop the removed package endpoints, document the settings
  endpoint, and correct the container hierarchy predicate to
  sioc:has_parent
- admin app URLs use the admin. subdomain, not an /admin path; examples
  use localhost:4443 and a single example agent URI throughout
- get-an-account: the CLI reads the .p12 keystore directly, PEM is only
  needed for curl

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Tgf5DjbYiX3SPnCFSgCzd
The multi-stage Docker example built the WAR overlay on maven:3.8.4-openjdk-17,
which cannot compile against a Java 21 platform - and the same page already told
you to target Java 21 ten lines further down. The build stage now matches the
platform's own Dockerfile.

The pinned versions were stale in the same way: the base image at 5.3.2 and the
overlay dependency at 5.5.3, both now 5.9.1, the current release.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Tgf5DjbYiX3SPnCFSgCzd
Present Northwind as a business application, and fix its schema.org modelling
Merge the duplicated pages into their parents (content blocks, documents,
resources, browse data), collapse the static ToC to the active trail, and
fix every broken anchor.

Add the versioning reference and the version-history guide; document the
Memento options of ldh get, federation through the Linked Data proxy, and
UI language negotiation. Sync the reskinned UI descriptions, the ORCID
login, the fuseki/ data directory and the make up/drop targets.

Import the tutorial from the docs-tutorial branch and migrate all of its
examples from the deprecated bin/ scripts to the ldh CLI.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WK1ssk2A67MYseeH3hWnhf
The generated pages link the vendored design-system stylesheets (fonts,
tokens, components, m3 skin, ldh-bridge) plus a docs-specific skin, and
drop Bootstrap 2 and jQuery. The shell mirrors the app's: the sticky
ldh-header carries the landing page's navbar content (version picker,
sample applications, GitHub and social buttons), and the ldh-footer
matches the app's footer.

ttl-to-html.sh copies the CSS and fonts from a local LinkedDataHub
checkout (LDH_SRC) or fetches them from GitHub (LDH_REF, default
develop - flip to master once 5.11.0 ships). The UI/CLI tab strips run
on vanilla JS; the rsync excludes now keep *.xsl and *.css out of the
published files/ tree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WK1ssk2A67MYseeH3hWnhf
docs/ and packages/ sit one level deep in the repository, but their
Makefiles defaulted the owner certificate three levels up - pointing
outside the sibling LinkedDataHub checkout, so accepting the make
install defaults failed on realpath. The demo apps sit two levels deep
and their three-level default is correct.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WK1ssk2A67MYseeH3hWnhf
One dataset runs through the whole documentation now: the examples that
used SKOS concepts, countries CSV, Places, Friends and DBpedia all draw
on the Northwind Traders demo instead, sourced from the demo app where
an exhibit exists and linked to its file on GitHub and the live
resource on northwind-traders.demo.linkeddatahub.com.

The tutorial conforms to the demo: the revenue query sums the line
totals the order-details mapping already computed (the old one
multiplied quantity in twice), the composition sequence matches
root.ttl, employees link portraits with foaf:img, and the dangling
query and block references are defined.

The demo grows the two pieces the docs lean on: a schema:Product
constructor and missing-name constraint in ns.ttl, and
categories/unesco-mappings.ttl mapping the eight categories to UNESCO
Thesaurus concepts - the RDF import example and the seed of the
cross-dataspace federation thread.

The exhibit-starved pages get their first exhibits: an
acl:Authorization and access request, the PATCH accepted/rejected pair,
the PROV-O TimeMap with its link-format and Memento exchanges, the
northwind-traders dataspace quoted from config/*.trig, and the
stylesheets reference gains the full global parameter table, the
author-facing function tables, and an input/output template pair. Every
runnable SPARQL exhibit was executed against the live demo endpoints;
screenshots are placeholder comments pending capture.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WK1ssk2A67MYseeH3hWnhf
The screenshot comments and the remaining Bootstrap-era media - six
YouTube embeds, four webm recordings and eleven screenshots - become
visible placeholder blocks: a dashed box with an image or play_circle
glyph and a caption typed "Screenshot:" or "Screen recording:" that
describes what the capture should show. The placeholder blocks are the
shot list, in place; the orphaned media files are removed.

Also corrects the Condiments pictureHash in the tutorial's CSV excerpt
to the file's real content hash.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WK1ssk2A67MYseeH3hWnhf
The Resources reference and the Query data guide each carry an actual
query block - an ldh:Object over an sp:Select bound through ldh:service
to an sd:Service pointing at the Northwind Traders demo's SPARQL
endpoint. Rendered in a LinkedDataHub instance, the block hydrates with
the service picker and editor, and Run executes against the remote
dataspace; the documentation demonstrates the platform inside itself.

The static site renders such blocks as an "Interactive block" stub in
the placeholder style instead of dropping them silently (the children
view stays suppressed - containers list their children separately).
These two pages' media placeholders from the preceding sweep ride
along.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WK1ssk2A67MYseeH3hWnhf
…ioms, a fuller function reference

Tab groups move from the dead Bootstrap tabbable markup to the design
system's ldhc-tabs component with ARIA roles and hidden-gated panels, on
all eight pages that use them; the static site's tab script follows. The
customization guides drop retired forms - $ac:uri patterns become
ac:absolute-path(ldh:base-uri(.)) - and the stylesheets reference gains
ac:uri() and eight more public functions (label helpers, sort companions,
ldh:link-targets, ldh:hash-code, value-set utilities) grouped into a new
Utility table, with the closing note honestly covering everything left
internal. Editing docs describe the dirty-gated autosave (no edits, no
save, no version) and the tab-group limitation: panels edit in place,
stacked while editing, but creating a group still takes the HTTP API.
Guides move from user-guide/ to extending/, and prose gets a wording pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1UnYpbW5aYLj7LbwtyUo1
Seventeen docs pages that presented mutually exclusive paths as sequential
headings now use the design system's tab groups: the reference Management
sections (UI/CLI pairs in data-model and versioning), the user-guide pages
whose CLI content trailed as a final heading (add-data's three sources,
version-history, create-resources), the triplestore authentication methods
(HTTP Basic / Bearer token), the authorization example in RDF and CLI form,
and the eight tutorial stages' in-the-browser/command-line pairs (insight's
CLI path is its chart+view walkthrough, kept whole as one panel).

The copenhagen and unesco-thesaurus demo apps shed their dead Bootstrap
markup (page-header/lead, and unesco's collapsed row-fluid/span grid) for
the ldh-section idiom, and gain tabs where their content branches: the
copenhagen feature run-on becomes a five-tab tour with links into the app,
unesco's usage-path dl becomes Browser/Editor/RDF Import (the import panel
now names skos-import.rq), and the concepts intro's relationship list
becomes Hierarchical/Associative/Matches with the live Northwind category
mappings as the matches example.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1UnYpbW5aYLj7LbwtyUo1
The tutorial's ten stages, setup's make targets, the Data stage's four
BIND variables and the annotation dialog's fields were all parallel
term-dash-description list items; each is now a striped table in the
reference pages' idiom (the dialog's advanced fields keep their own
table under the expander sentence, replacing a double-nested list).
See-also lists and prose-heavy routes stay lists - they enumerate
reading paths, not facts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1UnYpbW5aYLj7LbwtyUo1
The Resources reference contrasted two SELECT queries by padding them
into a single pre with spaces, so the pair read across the page instead
of down it and neither query could be copied on its own. They are now
two pre elements, each introduced by the sentence that says what it
does; the "# renders category documents" / "# renders nothing" comments
go, since the prose already carried them and their absence leaves the
queries paste-ready.

A sweep of the corpus for pre blocks with a second column of content
turned up no other side-by-side pair - the remaining multi-column
blocks are directory trees, aligned PREFIX declarations and end-of-line
comments, all single examples.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YxhcqMPK1kZR1pxxJqoge
Twenty-eight rdf:XMLLiteral lexical forms across the docs were not
exclusive-canonical XML. Forty-four screenshot-placeholder spans wrote
class before aria-hidden, and the stylesheets reference's wrapped
function signatures used self-closing <br/>; canonical form wants
attributes in alphabetical order and explicit end tags.

RDF 1.1 makes canonical form the datatype's lexical space, and Jena
4.7.0 - which the Check Docs syntax check pins - enforces it while
validating. The workflow runs under bash -e, so it aborted on the first
offending file and reported only about.ttl. Jena 5 and later dropped
the canonicalisation check and validate well-formedness alone, which is
why make validate stayed green locally the whole time.

Each literal is now its own xmllint --exc-c14n serialisation, so the
change is confined to attribute order and empty-element tags; no
whitespace, text or namespace moved.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YxhcqMPK1kZR1pxxJqoge
check-xmlliterals.sh extracts every """..."""^^rdf:XMLLiteral lexical
form, canonicalises it with xmllint --exc-c14n and diffs the result,
reporting file:line and the offending lines. Run against the tree as it
stood before the preceding commit, it returns the same verdict as Jena
4.7.0 on all twenty-eight offenders, with no false positives - so the
rule survives independently of which Jena is installed.

validate-documents.sh calls it after the riot pass, giving make validate
a check that can actually fail. Check Docs runs it as its own step,
which lets the syntax check move from the action's implicit 4.7.0
default to Jena 6.1.0 without losing the rule; Jena 6 needs Java 21 and
the runner defaults to 17, hence the setup-java step.

The check assumes each literal is a single-rooted fragment, which all
ninety-five are, and compares the Turtle-escaped text - sound here
because the corpus's only escape is \\, which canonicalisation leaves
untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YxhcqMPK1kZR1pxxJqoge
The matches tab pointed at concept3683/, concept1812/ and concept3495/
relative to the concepts container. Those documents are real once the
app is installed - skos-import.rq constructs them from the thesaurus
RDF - but they are never files in the repository, so check-links.sh,
which resolves relative links to checked-in .ttl files, could only
report them broken.

The three now address the public demo instance, in the same form the
Northwind mappings and the reference docs already use, and carry
target="_blank" like the app's other absolute links.

This surfaced only now: the RDF syntax check used to abort the Check
Docs job before the link step ever ran.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YxhcqMPK1kZR1pxxJqoge
Faceted search and parallax are rewritten around the view's control
header: facet pills in a toolbar at the top of the view, loading their
values with result counts on first open, and a chip row below it whose
pivots are discovered by querying the whole result set in both
directions - outgoing properties of the results and properties pointing
at them. Applied steps read via/linked by next to the facets, and
removing one rewinds the view to that step.

The action bar section describes the three zones: Create and Add on the
left, breadcrumb pills with document-type icons and the last-modified
timestamp in the middle, and the Actions, layout-mode and export
dropdowns on the right. The settings menu moves to the navigation bar
section, where the button now lives. The guides that pointed at retired
placements follow: Edit/Delete/Save as go through the Actions dropdown,
File/Query/Import creation goes through the creation bar at the bottom
of the page (the action bar's Create only offers Container and Item),
and the editor toolbar mounts below the action bar.

The right sidebar section becomes Backlinks: every block whose resource
has a URI carries its own links popover, loaded on first open - in
Properties mode that is one per resource in the document. The block
data model sheds the left/main/right column convention for the card
description, and the left sidebar is documented as the flyout it is,
with the stale narrow-screen claim dropped.

Graph-scoped updates state the PATCH contract: a single update
operation, in the DELETE/INSERT-with-WHERE form or the DELETE WHERE
shorthand, everything else answering 422 - matching
DocumentHierarchyGraphStoreImpl. The hand-written "On this page" lists
in the HTTP API and stylesheets references are dropped along the way.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WK1ssk2A67MYseeH3hWnhf
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1UnYpbW5aYLj7LbwtyUo1
$ldt:ontology, $ac:forClass, $ac:query and $ac:googleMapsKey survive in
client.xsl solely as Web-Client compatibility leftovers, and $ac:method
and $ac:httpHeaders are server-side layout internals - none of them is
part of the contract a custom stylesheet writes against. The bs2:Form
entry drops its $ac:forClass condition along with them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011j6GapYTmxZXEq3YK2Z53D
The dataset holds the current version of every document and nothing
else, which the versioning reference now states next to the read-only
notice rather than leaving readers to infer it from the Git-backed
storage.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011j6GapYTmxZXEq3YK2Z53D
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