This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Automated indexterms? was "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]