Pagenumbers like 'page 3 of 10' with XSL-FO

Using xsl-fo to generate PDFs, and you want to display the *pagenumbers *like 'page 3 of 10'? It isn't too hard. Just add this to the footer of your pages:Page of Then, make sure you have the following at the end of your document (so, on the last page):