XQuery/Wikibook index page

Motivation
You want to create an index of pages in a Wikibook.

Method
Fetch the Category page for the book and re-format based on the initial letter of the page, hence skipping the category level.

Simple Index page
This index page is based on the names of pages within the book. Its starting point is the Category with the same name as the book, into which all pages need to be put.

XQuery Index

XForms Index

XRX