@@ -150,10 +150,6 @@ ORDER BY DESC(?created)
150150 <!-- Strip query params from href to ensure consistent matching -->
151151 <xsl : variable name =" target-uri" select =" ac:document-uri($href)" as =" xs:anyURI" />
152152
153- <xsl : message >
154- ldh:DocTreeActivateHref $href: <xsl : value-of select =" $href" />, stripped: <xsl : value-of select =" $target-uri" />
155- </xsl : message >
156-
157153 <!-- make the previously active list items inactive -->
158154 <xsl : for-each select =" .//li[contains-token(@class, 'active')]" >
159155 <xsl : sequence select =" ixsl:call(ixsl:get(., 'classList'), 'toggle', [ 'active', false() ])[current-date() lt xs:date('2000-01-01')]" />
@@ -192,14 +188,11 @@ ORDER BY DESC(?created)
192188 <xsl : param name =" container" as =" element()" /> <!-- document-tree element -->
193189 <xsl : param name =" target" as =" xs:anyURI" /> <!-- target document URI (already stripped of query params) -->
194190
195- <xsl : message >ldh:DocTreeExpandPathAndActivate - starting descent for target: <xsl : value-of select =" $target" /></xsl : message >
196-
197191 <!-- Find the root <li> element (first top-level li in the tree) -->
198192 <xsl : variable name =" root-li" select =" $container/ul/li[1]" as =" element()?" />
199193
200194 <xsl : choose >
201195 <xsl : when test =" $root-li" >
202- <xsl : message >ldh:DocTreeExpandPathAndActivate - found root: <xsl : value-of select =" $root-li/a/@href" /></xsl : message >
203196 <!-- Start recursive descent from root -->
204197 <xsl : sequence select =" ldh:doctree-descend($root-li, $target, $container)[current-date() lt xs:date('2000-01-01')]" />
205198 </xsl : when >
@@ -471,12 +464,9 @@ ORDER BY DESC(?created)
471464 <!-- Strip query parameters for comparison -->
472465 <xsl : variable name =" current-href" select =" ac:document-uri($current-href-full)" as =" xs:anyURI" />
473466
474- <xsl : message >ldh:doctree-descend - current: <xsl : value-of select =" $current-href" />, target: <xsl : value-of select =" $target-uri" /></xsl : message >
475-
476467 <xsl : choose >
477468 <!-- Case 1: We've reached the target - activate it -->
478469 <xsl : when test =" $current-href = $target-uri" >
479- <xsl : message >ldh:doctree-descend - reached target, activating</xsl : message >
480470 <xsl : for-each select =" $tree-container" >
481471 <xsl : call-template name =" ldh:DocTreeActivateHref" >
482472 <xsl : with-param name =" href" select =" $target-uri" />
@@ -492,8 +482,6 @@ ORDER BY DESC(?created)
492482 <xsl : choose >
493483 <!-- Case 2a: Has expand button and not expanded yet - expand and load children -->
494484 <xsl : when test =" $expand-button and not($current-li/ul)" >
495- <xsl : message >ldh:doctree-descend - expanding: <xsl : value-of select =" $current-href" /></xsl : message >
496-
497485 <!-- Create <ul> for children -->
498486 <xsl : for-each select =" $current-li" >
499487 <xsl : result-document href =" ?." method =" ixsl:append-content" >
@@ -552,18 +540,14 @@ ORDER BY DESC(?created)
552540
553541 <!-- Case 2b: Already expanded - find next child to descend into -->
554542 <xsl : when test =" $current-li/ul/li" >
555- <xsl : message >ldh:doctree-descend - already expanded, finding next child</xsl : message >
556-
557543 <!-- Find which child's href (without query params) is a prefix of target-uri -->
558544 <xsl : variable name =" next-li" select =" $current-li/ul/li[starts-with(string($target-uri), string(ac:document-uri(xs:anyURI(a/@href))))][1]" as =" element()?" />
559545
560546 <xsl : choose >
561547 <xsl : when test =" $next-li" >
562- <xsl : message >ldh:doctree-descend - descending to: <xsl : value-of select =" $next-li/a/@href" /></xsl : message >
563548 <xsl : sequence select =" ldh:doctree-descend($next-li, $target-uri, $tree-container)" />
564549 </xsl : when >
565550 <xsl : otherwise >
566- <xsl : message >ldh:doctree-descend - no matching child found, activating target</xsl : message >
567551 <xsl : for-each select =" $tree-container" >
568552 <xsl : call-template name =" ldh:DocTreeActivateHref" >
569553 <xsl : with-param name =" href" select =" $target-uri" />
@@ -576,15 +560,13 @@ ORDER BY DESC(?created)
576560
577561 <!-- Case 2c: Has expand button but <ul> exists and is empty (loading in progress) -->
578562 <xsl : otherwise >
579- <xsl : message >ldh:doctree-descend - waiting for children to load</xsl : message >
580563 <xsl : sequence select =" map{}" />
581564 </xsl : otherwise >
582565 </xsl : choose >
583566 </xsl : when >
584567
585568 <!-- Case 3: Target is not under this branch -->
586569 <xsl : otherwise >
587- <xsl : message >ldh:doctree-descend - target not under this branch</xsl : message >
588570 <xsl : sequence select =" map{}" />
589571 </xsl : otherwise >
590572 </xsl : choose >
@@ -597,18 +579,14 @@ ORDER BY DESC(?created)
597579 <xsl : param name =" target-uri" as =" xs:anyURI" />
598580 <xsl : param name =" tree-container" as =" element()" />
599581
600- <xsl : message >ldh:doctree-descend-after-load - children loaded for: <xsl : value-of select =" $current-li/a/@href" /></xsl : message >
601-
602582 <!-- Find which child's href (without query params) is a prefix of target-uri -->
603583 <xsl : variable name =" next-li" select =" $current-li/ul/li[starts-with(string($target-uri), string(ac:document-uri(xs:anyURI(a/@href))))][1]" as =" element()?" />
604584
605585 <xsl : choose >
606586 <xsl : when test =" $next-li" >
607- <xsl : message >ldh:doctree-descend-after-load - descending to: <xsl : value-of select =" $next-li/a/@href" /></xsl : message >
608587 <xsl : sequence select =" ldh:doctree-descend($next-li, $target-uri, $tree-container)" />
609588 </xsl : when >
610589 <xsl : otherwise >
611- <xsl : message >ldh:doctree-descend-after-load - no matching child, activating target</xsl : message >
612590 <xsl : for-each select =" $tree-container" >
613591 <xsl : call-template name =" ldh:DocTreeActivateHref" >
614592 <xsl : with-param name =" href" select =" $target-uri" />
0 commit comments