Skip to content

StylesheetResolver: let Saxon resolve local xsl:import/include again#87

Open
namedgraph wants to merge 7 commits into
masterfrom
rf-default-xsl-resolver
Open

StylesheetResolver: let Saxon resolve local xsl:import/include again#87
namedgraph wants to merge 7 commits into
masterfrom
rf-default-xsl-resolver

Conversation

@namedgraph

Copy link
Copy Markdown
Member

Return null for non-HTTP locations so Saxon's default resolver opens file:/jar:/classpath stylesheet imports directly, instead of routing them through the RIOT StreamManager. All stylesheet imports are relative and resolve against a file:/jar: base with no location mapping, so the StreamManager hop added nothing but debug noise. HTTP imports still go through the GraphStoreClient; the repository is still used for URI->location mapping. Drops the now-unused logger and TypedInputStream.

namedgraph and others added 7 commits July 5, 2026 17:30
Return null for non-HTTP locations so Saxon's default resolver opens
file:/jar:/classpath stylesheet imports directly, instead of routing
them through the RIOT StreamManager. All stylesheet imports are relative
and resolve against a file:/jar: base with no location mapping, so the
StreamManager hop added nothing but debug noise. HTTP imports still go
through the GraphStoreClient; the repository is still used for
URI->location mapping. Drops the now-unused logger and TypedInputStream.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…Client

Restore the pre-ont-api XsltResolver design: the resolver takes a plain
SSL-configured JAX-RS Client and fetches http(s) stylesheet imports with
Accept: text/xsl, returning null for local (file:/jar:/classpath) so
Saxon's default resolver opens them. A Graph Store Protocol client has no
business fetching XSLT, and stylesheet URIs are never location-mapped, so
PrefixGraphRepository is dropped too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ConstructForClass: an unreachable ontology or owl:import now degrades to
an empty construct result with a warning, as OntDocumentManager used to,
instead of failing the whole transform — repository loads throw unchecked
Jersey/RIOT exceptions that the previous catch (IOException) missed.

PrefixGraphRepository: the inherited DocumentGraphRepository store is a
plain HashMap but the repository is shared across request threads
(document() resolution, ontology loading, proxy caching), so concurrent
first-loads could corrupt the map. Store access is now synchronized;
get() double-checks so that load I/O stays outside the lock, and
ids()/loadedGraphs() return snapshots taken under it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The store keyed graphs by URI, so an actor minting distinct URIs under a
mapped prefix (e.g. http://xmlns.com/foaf/0.1/<n>) grew it without bound —
each URI cached its own copy of the same bundled ontology. Bundled
(non-HTTP mapped) documents are now cached by their resolved location, so
every URI in a namespace shares one graph and the cache is bounded by the
number of bundled files. Also require the prefix match to land on a URI
boundary (/ or #) so an unrelated URI can't resolve to a mapped location.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The param was accepted by the Application constructor but never stored or
used — preemptive HTTP Basic auth has no place in the post-ont-api stack
(delegation filters handle authenticated dereferencing). Follows the
removal of the flag from Core.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Back the URI-keyed (dynamically loaded) graphs with a map from a
protected createStore() factory instead of the inherited
DocumentGraphRepository store. The default is an unbounded HashMap, so
behavior is unchanged here — but subclasses can now supply a
bounded/evicting map without Web-Client taking on any eviction logic or
dependency. The location-keyed bundled-document cache stays separate and
unbounded (bounded by file count).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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