Add chapter, appendix, or part numbers to index entries

Use a new getChapterPrefixForIndex template to add chapter, appendix, or part numbers to index entries.

This exercise applies only if you are publishing from a bookmap. Chapter, appendix and part numbering depend on the presence of the <chapter>, <appendix> and <part> elements, which are not available in a map.

Before we plunge into the steps, here is some additional helpful information from Eliot Kimber:

A feature in FO 1.1 is support for "folios," that is, page number definitions at the page sequence level that include additional prefix or suffix values to use with the page number, such as the chapter number.

Because the folio prefix and suffix are defined at the page sequence ...