I am looking to reverse in XSL/FO a for-each loop.
for instance the xml
Use xsl:sort not for ordering by @id but for ordering by position():
@id
position()