From 6776978ce8ff8f6d17cdafeff0451889423e2357 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Thu, 18 Jun 2026 09:31:27 -0500 Subject: [PATCH] doc: Fix "Prev" link, take 2. Commit 6678b58d78 fixed a wrong "Prev" link by changing the link generation code to use [position()=last()] instead of [last()] in the predicate on the union of reverse axes. Unfortunately, that caused documentation builds to take much longer. To fix, combine the "preceding" and "ancestor" steps into one "preceding" step and one "ancestor" step, and revert the predicate back to [last()]. The smaller union evades the libxml2 bug while avoiding the build time regression. Reported-by: Tom Lane Tested-by: Tom Lane Discussion: https://postgr.es/m/1132496.1781718007%40sss.pgh.pa.us Backpatch-through: 14 --- doc/src/sgml/stylesheet-speedup-xhtml.xsl | 52 +++++++++++------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/doc/src/sgml/stylesheet-speedup-xhtml.xsl b/doc/src/sgml/stylesheet-speedup-xhtml.xsl index a3b3692ba03..0e8e97c7e5c 100644 --- a/doc/src/sgml/stylesheet-speedup-xhtml.xsl +++ b/doc/src/sgml/stylesheet-speedup-xhtml.xsl @@ -183,32 +183,32 @@ + select="(preceding::*[self::book + or self::preface + or self::chapter + or self::appendix + or self::part + or self::reference + or self::refentry + or self::colophon + or self::article + or self::topic + or self::sect1 + or self::bibliography[parent::article or parent::book or parent::part] + or self ::glossary[parent::article or parent::book or parent::part] + or self::index[$generate.index != 0] + [parent::article or parent::book or parent::part] + or self::setindex[$generate.index != 0]][1] + |ancestor::*[self::set + or self::book + or self::preface + or self::chapter + or self::appendix + or self::part + or self::reference + or self::article + or self::topic + or self::sect1][1])[last()]"/>