Client side property/object metadata#298
Merged
Merged
Conversation
…keys Adds ldh:load-property-metadata/ldh:set-property-metadata to the promise chain after object metadata, fetching vocabulary labels via DESCRIBE against /ns. Threads property-metadata and object-metadata tunnel params through bs2:DocumentBody and bs2:PropertyList so sort keys resolve vocabulary labels client-side. Also adds ac:object-label 2-arg overload and preloads common namespace ontologies into the document cache. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
namedgraph
added a commit
that referenced
this pull request
May 12, 2026
The pre-cached vocabulary documentPool keys entries under resolve-uri(ac:document-uri(<ns>), \$ac:contextUri) — ac:document-uri strips the trailing fragment so hash namespaces like &http; are stored under http://www.w3.org/2011/http (no #). The ac:property-label mode C branch was looking up documents via doc-available(namespace-uri()) / document(namespace-uri()), which still includes the # for hash vocabs, so the lookup missed and labels for http:*, rdf:*, rdfs:*, spin:* etc. fell through to the local-name() fallback. Slash-namespace vocabs (dct:, etc.) happened to work because there's no fragment to strip on either side. Server-side Saxon was unaffected because Java's URI resolver fetches over HTTP and the wire layer drops the fragment naturally. Wrap the lookup in ac:document-uri(namespace-uri()) so it matches the cache key. Also drops the temporary xsl:message debug lines added in #298. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
namedgraph
added a commit
that referenced
this pull request
May 14, 2026
The doc-available()/document(namespace-uri()) branch in ac:property-label (default.xsl) was unguarded after #298, so on Saxon-JS it fell back to a synchronous XMLHttpRequest for every property whose namespace wasn't already in the documentPool. With ?mode= on the source RDF's base URI, document('') resolved to the page URL and Firefox served the cached HTML representation to that sync XHR, producing the cascade of "XML Parsing Error: Expected: </meta>" failures after ldh:set-property-metadata. ac:property-label is invoked from xsl:sort and can't be made async, so the fix uses Saxon-JS's own ixsl:doc-fetched() — a synchronous probe of the internal documentPool (SaxonJS3.rt.js: I.fixed.Ta[$uri]) that triggers no fetch. Saxon's doc-available() probe is restored with its pre-#298 use-when="...SAXON" guard so server-side behaviour is unchanged. ac:object-label gets the symmetric addition: the LDH override at default.xsl:87 had inherited the SPARQL-based $object-metadata branch but dropped Web-Client's doc-fetch branch entirely, so object URIs whose label lived in a cached vocab (e.g. skos:Concept, ldh:View) never resolved client-side. Both processors now have parallel chains: local source RDF → async-loaded metadata → documentPool/live-fetch → URI heuristics. rdf.xsl bs2:TypeControl gets the same gating: ac:label(key(..., ...)) stays unconditional, only the document() source inside key() is wrapped in if (ixsl:doc-fetched(...)) then ... else () on Saxon-JS to avoid the sync XHR. xmlns:ixsl declaration added to rdf.xsl since it didn't have one. Debug xsl:message lines included in all three SaxonJS branches to verify which lookups take the documentPool path; safe to strip in a follow-up. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.