Commit 0d4cea0
Gate client-side vocab-doc lookups on ixsl:doc-fetched()
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>1 parent 6fcca1a commit 0d4cea0
2 files changed
Lines changed: 18 additions & 2 deletions
File tree
- src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/imports
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
99 | 106 | | |
100 | 107 | | |
101 | 108 | | |
| |||
418 | 425 | | |
419 | 426 | | |
420 | 427 | | |
421 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
422 | 433 | | |
423 | 434 | | |
424 | 435 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| |||
0 commit comments