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]

Re: comprehensive indexing


Norman Walsh wrote:
> 
> / Gregory Leblanc <gleblanc@cu-portland.edu> was heard to say:
> | document containing part numbers, and I'd like to generate a section at
> | the end of my document that contains links back to EVERY part number
> | that I've mentioned.  I've looked over Norm Walsh's book, but I'm still
> | not clear on how this can be done.  Thanks in advance for
> | pointer/advice,
> 
> What you're asking for is a very custom application. I can think of a
> couple of ways to achieve what you want. But first, let's make sure I
> understand your setup :-)
> 
> You have a bunch of documents that contain things like this:
> 
>   <para>Some text referring to a product number
>   <productnumber>X-13-144</productnumber> that needs to be
>   indexed.</para>

Well, I haven't actually started on this yet, I was mostly trying to
figure out how/if it could be done first.  But yes, this is what I
intend to do.  productnumber is a custom tag, right?

> 
> When you process your document, you want to build an index (or
> cross reference) of all product numbers.

Exactly.

> 
> Two possible solutions occur to me, off the top of my head:
> 
> 1. Use the stylesheet. Write a custom stylesheet that finds all
>    of the product numbers in your document and "does the right
>    thing."  Depending on the stylesheet language you're using
>    this will be very easy or very hard (or somewhere in between)
>    and very fast or very slow (or somewhere in between).

I'll have to browse your book and see what info it has on this, to see
just how challenging it sounds.

> 
> 2. Pre-process your document to augment the source so that it reads:
> 
>   <para>Some text referring to a product number
>   <productnumber>X-13-144</productnumber><indexterm>
>   <primary>X-13-144</primary></indexterm> that needs to be
>   indexed.</para>

I think I recall reading about indexterms in your DocBook guide, and
I'll have to go back and find that section again (or wherever it was
that I found it).  I wasn't sure that this would do what I wanted.

> 
>   Then use standard indexing tools to produce the index

What are "standard indexing tools"?

> 
> 3. Some combination of 1 and 2. You could preprocess all of the
>    product numbers so that they had IDs; then use an external
>    tool to build an index (i.e. a docbook <index>) of them based
>    on ID. Then just format the index.

What exactly is "preprocessing"?  Is this part of the process of marking
up my document, or do I run it through some tool to add attributes
whenever it sees <thus_and_such>?

> 
> Does that help?

Yes, lots, no, none at all.  :)  I think I'm pointed in the right
direction, now, and can do a little more reading.  Thanks,
	Greg


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