This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Automated indexterms? was "proper use of indexterm?"
- From: David Cramer <dcramer at broadjump dot com>
- To: "A.R. (Tom) Peters" <tpeters at xs4all dot nl>, docbook-apps at lists dot oasis-open dot org
- Cc: docbook at lists dot oasis-open dot org
- Date: Tue, 21 Jan 2003 11:06:16 -0600
- Subject: Automated indexterms? was "DOCBOOK: proper use of indexterm?"
I'm taking this in a tools direction, so moving it to docbook-apps.
<snip/>
> Any word that is in the glossary is interesting, so should be in the
> index; I hoped to accomplish that by specifying the indexterm in the
> glossentry - which appears legal from the documentation - and have the
> processors search a <part label="A"> for occurrences of the term.
<snip/>
I've also notice that some elements should always be indexterms and thought that it should be automated. In cases where I use docbook as an intermediary format, I have added indexterms automatically on the way to docbook. One option would be to preprocess the file to add indexterms immediately before sending it to the DocBook xsls:
<xsl:template match="database | filename | glossterm[not(ancestor::glossary)]">
<xsl:copy-of select="."/><indexterm><primary><xsl:value-of select="normalize-space(.)"/></primary></indexterm>
</xsl:template match>
Would a something like this be generally useful enough (and possible to implement without adding too much processing overhead) to merit a feature request? Any problems with the idea that I'm not seeing? I'm envisioning a parameter or similar mechanism where the stylesheet user specifies a list of elements that should always be included in the index: autoindex.elements or something.
David