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] | [Elist Home]


Subject: RE: DOCBOOK-APPS: mkdiff + index building


TDG:

"IndexTerms mark either a single point in the document or a range. A single
point is marked with an IndexTerm placed in the text at the point of
reference. There are two ways to identify a range of text: 

* Place an IndexTerm at the beginning of the range with Class set to
StartOfRange and give this term an ID. Place another IndexTerm at the end of
the range with StartRef pointing to the ID of the starting IndexTerm. This
second IndexTerm must be empty. 

The advantage of this method is that the range can span unbalanced element
boundries. 

* Place the IndexTerm anywhere you like and point to the element that
contains the range of text you wish to index with the Zone attribute on the
IndexTerm. Note that Zone is defined as IDREFS so a single IndexTerm can
point to multiple ranges. 

The advantage of this method is that IndexTerms can be collected together or
even stored totally outside the flow of the document (in the meta for
example)."

I.e., you can build an external list of elements, provided they have IDs,
and then associate IndexTerm elements with those elements using IDREFs. It
is of course not feasible to put an ID on every word in the body text;
you'll have to find an enclosing element and ensure it has the ID attribute.
You can populate elements with unique IDs at document creation time or as a
separate processing step. Theoretically, even without IDs it might be
feasible to point to anywhere in the document with a XPath expression (or
similar HyTime construct); in practice, it won't be stable without
dependable IDs. If you manage to get something XPath-aware working, you can
point to a range of #PCDATA inside an element, but it might not be needed.
For online presentation, page numbers does not make much sense anyway, and
for typeset paginated presentation, you can usually get away with refering
to an eclosing element.

Kind regards,
Peter Ring




-----Original Message-----
From: ben [mailto:nicolas.marsgui@libertysurf.fr]
Sent: Wednesday, November 07, 2001 11:13 PM
To: docbook
Subject: Re: DOCBOOK-APPS: mkdiff + index building


Peter Eisentraut a écrit :

> ben writes:
>
> > Beside this, I've another question: I would like to make an index
> > automatically from a predefined list of words, without adding by hand
> > the <indexterm> tags everywhere in the file. I know it's not hard to
> > hack something to do this, but maybe a tool already exists, so...
>
> I don't think this can work, because the index entries wouldn't have an
> anchor to point to.  At least you would be in for some non-trivial work to
> make that happen.

I thought that was the purpose of indexterm: to say where the indexentries
should point to in the doc. Am I wrong?

"IndexTerms identify text that is to be placed in the index. In the simplest
case, the placement of the IndexTerm in the document identifies the location
of the term in the text. In other words, the IndexTerm is placed in the flow
of the document at the point where the IndexEntry in the Index should point"
says TDG.

Besides, I translate to latex so links are simply made by latex/makeindex.

BG



----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>


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


Powered by eList eXpress LLC