I’ve been doing a bit of Docbook work recently - converting a paper based manual into a Docbook one that can then be used to generate all kinds of different output from the same input file. Very useful.
I needed to create an index that correctly reflected the contents of the new format rather than simply copying the old one - where the pages would no longer have matched up.
I found a couple of good articles, namely:
http://www.xml.com/pub/a/2004/07/14/dbndx.html
and, of course, this one:
http://www.sagehill.net/docbookxsl/GenerateIndex.html
UPDATE: Of all the people you would expect to get it right, Bob Stayton is the one. Except he got it wrong. In the link above to www.sagehill.net, there is an example thus:
|
|
It should be as follows without the <primary>
on the endofrange
indexterm.
|
|
If you do it with a primary, you get the page range as expected, but with the final page duplicated, as in:
|
|
Remove the primary and it just works.