Commit 2a75032
Thread doc-uri / fragment / mode separately across navigation
The client-side navigation pipeline overloaded a single $uri to mean
both "doc to fetch/cache" and "resource to display." Different
consumers silently stripped or kept different parts, surfacing as:
blank panes on fragment-bearing link clicks, mode toggles ignored
when the doc was cached, URL bar gaining a re-encoded fragment after
forth-and-back navigation across the local tab.
Split into explicit components, threaded through every entry point:
- $doc-uri (no fragment, no query) — cache key
(LinkedDataHub.contents), tab <li> data-uri, pane @about, every
lookup predicate. Always via ac:absolute-path.
- $fragment — the sub-anchor; lives on the outer URL per RFC 3986,
extracted via ac:fragment-id($href). Round-tripped through tab
@href via the 3-arity ldh:href.
- $query-params — mode/forClass/etc.; callers strip the URL fragment
via ac:document-uri before passing to ldh:parse-query-params, so
no caller can corrupt the last value by gluing the fragment onto it.
Touched: ldh:DocumentNavigate, ldh:RDFDocumentLoad,
ldh:rdf-document-response, ldh:RenderTab, ldh:ActivateTab,
ldh:TabSwitch, ldh:AddTabNavBarListItem; the four event handlers
(main, link click, tab click, popstate), close-tab fallback,
navbar-form, onDelete, onRDFFileUpload; modal/form callers in
bootstrap/2.3.2/client. bs2:TabBody and bs2:DocumentBody now take
@about as a mandatory param; the no-op ixsl:set-attribute workaround
(operating on a detached node after ixsl:replace-element) is removed;
layout.xsl passes @about server-side.
TabSwitch gate requires cache hit AND non-uri query params unchanged
(deep-equal vs ldh:query-params()); mode changes correctly fall
through to DocumentNavigate, so the rendered DOM gets refreshed.
ldh:query-params is now defined once (imports/default.xsl); the
client-side override that wrapped ixsl:query-params() shadowed
fragment-safe parsing and is removed. The remaining direct
ixsl:query-params() callers (ac:query stylesheet param,
navigation.xsl mode tunnel) go through ldh:query-params() too.
Anchor-emitting server templates (xhtml:Anchor, svg:Anchor,
@Rdf:resource|srx:uri) drop the encoded-full-URI fragment convention:
$fragment = ac:fragment-id(.), $href via ac:document-uri. External
resource links become ?uri=<doc-uri>#<frag> instead of
?uri=<doc-uri%23frag>#<encoded-full-uri>.
Scroll-to-fragment in RenderTab and TabSwitch uses
[@about = $resource-uri] in the active pane, replacing
id($fragment, ixsl:page()). Sidesteps the DOM-id uniqueness
constraint when two panes both render a resource at #this — the
RDFa-emitted @about is resource-URI-scoped, naturally unique.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5525722 commit 2a75032
8 files changed
Lines changed: 208 additions & 133 deletions
File tree
- src/main/webapp/static/com/atomgraph/linkeddatahub/xsl
- bootstrap/2.3.2
- client
- imports
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
762 | 762 | | |
763 | 763 | | |
764 | 764 | | |
765 | | - | |
| 765 | + | |
| 766 | + | |
766 | 767 | | |
767 | | - | |
| 768 | + | |
768 | 769 | | |
769 | 770 | | |
770 | 771 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 44 | + | |
47 | 45 | | |
48 | 46 | | |
49 | 47 | | |
| |||
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1272 | 1272 | | |
1273 | 1273 | | |
1274 | 1274 | | |
1275 | | - | |
| 1275 | + | |
| 1276 | + | |
1276 | 1277 | | |
1277 | 1278 | | |
1278 | 1279 | | |
| |||
1571 | 1572 | | |
1572 | 1573 | | |
1573 | 1574 | | |
1574 | | - | |
| 1575 | + | |
| 1576 | + | |
1575 | 1577 | | |
1576 | 1578 | | |
1577 | 1579 | | |
| |||
1598 | 1600 | | |
1599 | 1601 | | |
1600 | 1602 | | |
1601 | | - | |
| 1603 | + | |
| 1604 | + | |
1602 | 1605 | | |
1603 | 1606 | | |
1604 | 1607 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
670 | | - | |
| 670 | + | |
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| 422 | + | |
422 | 423 | | |
423 | 424 | | |
424 | 425 | | |
| |||
444 | 445 | | |
445 | 446 | | |
446 | 447 | | |
| 448 | + | |
447 | 449 | | |
448 | 450 | | |
449 | 451 | | |
| |||
454 | 456 | | |
455 | 457 | | |
456 | 458 | | |
457 | | - | |
| 459 | + | |
458 | 460 | | |
459 | 461 | | |
460 | 462 | | |
| |||
464 | 466 | | |
465 | 467 | | |
466 | 468 | | |
467 | | - | |
468 | | - | |
469 | | - | |
| 469 | + | |
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
| |||
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
| 165 | + | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| |||
329 | 330 | | |
330 | 331 | | |
331 | 332 | | |
332 | | - | |
| 333 | + | |
333 | 334 | | |
334 | 335 | | |
335 | 336 | | |
| |||
534 | 535 | | |
535 | 536 | | |
536 | 537 | | |
537 | | - | |
538 | | - | |
| 538 | + | |
| 539 | + | |
539 | 540 | | |
540 | 541 | | |
541 | 542 | | |
| |||
551 | 552 | | |
552 | 553 | | |
553 | 554 | | |
554 | | - | |
555 | | - | |
| 555 | + | |
| 556 | + | |
556 | 557 | | |
557 | 558 | | |
558 | 559 | | |
| |||
573 | 574 | | |
574 | 575 | | |
575 | 576 | | |
576 | | - | |
577 | | - | |
| 577 | + | |
| 578 | + | |
578 | 579 | | |
579 | 580 | | |
580 | 581 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
758 | 758 | | |
759 | 759 | | |
760 | 760 | | |
| 761 | + | |
761 | 762 | | |
762 | 763 | | |
763 | 764 | | |
| |||
0 commit comments