OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Duplicate index entries to the same page


With the standard Docbook generated index (for FO), there is no provision for eliminating duplicate identical references to the same page, resulting in index entries which look like this:
Command Line Interface, 3, 17, 17, 23
which is not very appealing. The problem is, of course, that there is no absolute way in XSLT to avoid this, since the actual page numbers are generated by the rendering engine, after the XSLT processing is already finished. There are solutions which involve a two-pass process, which may be too involved for many users. I have developed a partial solution (not for Docbook, as of yet) in which the @id to based on which the page numbers in the index are generated is not the id of the indexterm element itself, rather of the closest ancestral section or subsection. In the process of collecting all the index entries from the document, a check is made if the same entry is already listed under that section; if so, the new entry is ignored. If the sections are roughly one page in size, this procedure should eliminate most of the duplicate entries (if the sections are too large, then even entries on different pages will be eliminated, which is not the desired behavior). A collateral benefit of this is that the link from the index will lead to the beginning of the section which contains the indexterm, which will often be more useful than being plunked down in the middle of a paragraph. Have any other users been bothered by this problem? If there is a demand, I can update the templates accordingly. (It would also be possible to introduce a parameter which would determine if the user wants the old kind of index, without trying to remove duplicate entries [for example, for a document which has very large sections] or the new kind).
David Zalkin
Technology Consultant
Tech-Tav Documentation Ltd.
+972 (0)57 313 8506
BEGIN:VCARD
VERSION:2.1
N:Zalkin;Dovid;L.
FN:Dovid L. Zalkin
ORG:Tech-Tav Documentation Ltd.;Technological Support
TITLE:Technology Consultant
TEL;WORK;VOICE:+972-57-313-8506
TEL;HOME;VOICE:+972-8-974-0763
TEL;CELL;VOICE:+972-57-313-8506
TEL;WORK;FAX:+972-8-974-3843
ADR;WORK:;;2 Yechezkel;Modiin Illit;;71919;Israel
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:2 Yechezkel=0D=0AModiin Illit 71919=0D=0AIsrael
URL;WORK:http://www.tech-tav.com
EMAIL;PREF;INTERNET:dovid@tech-tav.com
REV:20060905T102337Z
END:VCARD


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]