Right now, if you go to the following page and click "Prev", it'll send you
to the middle of the previous chapter:
https://www.postgresql.org/docs/devel/bgworker.html
My research indicates that this might caused by a bug in libxml2, but
regardless, a minimal fix is to change the link generation code to use
[position()=last()] instead of [last()] in the predicate on the union of
reverse axes. Patch attached.
--
nathan
>From b874600ab6df9252b04ea4b9d98ece2e1f917850 Mon Sep 17 00:00:00 2001
From: Nathan Bossart <[email protected]>
Date: Wed, 10 Jun 2026 14:14:45 -0500
Subject: [PATCH v1 1/1] fix prev link in docs
---
doc/src/sgml/stylesheet-speedup-xhtml.xsl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/stylesheet-speedup-xhtml.xsl
b/doc/src/sgml/stylesheet-speedup-xhtml.xsl
index da0f2b5a970..a3b3692ba03 100644
--- a/doc/src/sgml/stylesheet-speedup-xhtml.xsl
+++ b/doc/src/sgml/stylesheet-speedup-xhtml.xsl
@@ -208,7 +208,7 @@
|ancestor::article[1]
|ancestor::topic[1]
|preceding::sect1[1]
- |ancestor::sect1[1])[last()]"/>
+ |ancestor::sect1[1])[position()=last()]"/>
<xsl:variable name="next"
select="(following::book[1]
--
2.50.1 (Apple Git-155)