]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
doc: Fix "Prev" link.
authorNathan Bossart <nathan@postgresql.org>
Mon, 15 Jun 2026 17:16:38 +0000 (12:16 -0500)
committerNathan Bossart <nathan@postgresql.org>
Mon, 15 Jun 2026 17:16:38 +0000 (12:16 -0500)
Presently, the "Prev" link on the page for background workers sends
you to the middle of the previous chapter instead of the actual
previous page.  This appears to be caused by a libxml2 bug, 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.

Reviewed-by: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Discussion: https://postgr.es/m/aim4AZorFKaC7Wrf%40nathan
Backpatch-through: 14

doc/src/sgml/stylesheet-speedup-xhtml.xsl

index da0f2b5a970e7801f27605ed4ac5a9b00563a603..a3b3692ba03c8d29717886e0126f31f7be78f292 100644 (file)
              |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]