From: Nathan Bossart Date: Thu, 18 Jun 2026 14:31:27 +0000 (-0500) Subject: doc: Fix "Prev" link, take 2. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0a5c4fbfc42f57a4564b9919c7eb0c52e656fc1;p=thirdparty%2Fpostgresql.git 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 --- 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()]"/>