Bug 64111 - generated index error with multiple seealso entries
Summary: generated index error with multiple seealso entries
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: docbook-style-dsssl
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-04-25 20:13 UTC by Tammy Fox
Modified: 2008-05-01 15:38 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-05-03 17:48:38 UTC
Embargoed:


Attachments (Terms of Use)
Example SGML file with 2 seealso index terms (22.08 KB, text/plain)
2002-05-01 14:51 UTC, Tammy Fox
no flags Details
Can you test this patch out to see if it does the right thing for you and doesn't break anything else? (1.03 KB, patch)
2002-05-02 08:36 UTC, Tim Waugh
no flags Details | Diff
example with multi secondary indexterms (22.61 KB, text/plain)
2002-05-02 19:05 UTC, Tammy Fox
no flags Details

Description Tammy Fox 2002-04-25 20:13:49 UTC
If you use /usr/bin/collateindex.pl to generate an index from indexterms,
it adds an extra comma to the generated index file, causing it not
to parse correctly.

For example, if you have the following indexterm definitions:

	<indexterm>
	  <primary>file system</primary>
	  <secondary>ext3</secondary>
	  <seealso><command>mkfs</command></seealso>
	</indexterm>

	<indexterm>
	  <primary>file system</primary>
	  <secondary>ext3</secondary>
	  <seealso><command>e2label</command></seealso>
	</indexterm>

It generates an HTML index that looks like this:
file system
    ext3, Formating ext3 File Systems with mkfs
        See also mkfs
        ,
        Assigning a Label with e2label
        See also e2label

Comment 1 Tim Waugh 2002-04-25 21:03:43 UTC
I can't figure out how to use collateindex.pl.  Can you give me a step-by-step 
list of what to do, along with a complete (but minimal) input file?  Thanks.

Comment 2 Tammy Fox 2002-05-01 14:51:40 UTC
Created attachment 56045 [details]
Example SGML file with 2 seealso index terms

Comment 3 Tammy Fox 2002-05-01 14:54:11 UTC
I attached a sample file that produces the error. You can run db2indexed-html
from the docs-stuff CVS module on devserv. It runs collateindex.pl and creates
generated-index.html. Ignore the error msg about not having
rh-sgml/stylesheet-images.

Comment 4 Tim Waugh 2002-05-01 16:20:25 UTC
I think I see what's going on. 
 
What do you think that the generated-index.sgml indexentry element should look 
like for that case?

Comment 5 Tammy Fox 2002-05-01 16:57:25 UTC
The simplest way to fix it is to see if another seealso already exists and
not insert another comma. That seems acceptable to me.

Comment 6 Tim Waugh 2002-05-01 17:02:53 UTC
I'm not sure it's all that simple.  It isn't just the comma that's in the 
wrong place---the ulink isn't allowed there either. 
 
Please try to edit the generated-index.sgml's indexentry into something you're 
happy with, and I'll try to get collateindex.pl to generate that for this 
case.

Comment 7 Tammy Fox 2002-05-01 20:18:54 UTC
Can you put all the locators in a comma-separated list after the indexterm and
put all the seealso entries at the end of the list like this:

<indexentry>
  <primaryie>file system
  </primaryie>
  <secondaryie>ext3,
    <ulink url="test.html" role="AEN9">Chapter Test</ulink>,
    <ulink url="test.html#SECTION" role="AEN30">Example of Section 1
    Title</ulink>    
      </secondaryie>
      <seealsoie>e2label</seealsoie>
    <seealsoie>mkfs</seealsoie>
</indexentry>



Comment 8 Tim Waugh 2002-05-02 08:36:23 UTC
Created attachment 56144 [details]
Can you test this patch out to see if it does the right thing for you and doesn't break anything else?

Comment 9 Tim Waugh 2002-05-02 14:59:27 UTC
I've built this as docbook-style-dsssl-1.76-2.  Please re-open if it breaks 
something (I'm pretty sure it doesn't).

Comment 10 Tammy Fox 2002-05-02 19:04:53 UTC
Actually, it is putting the seealso statements at the end of the indexterms, but
at the end of the wrong indexterms. I am about to attach a file that has
multiple secondary indexterms under the same primary indexterm. The seealso locators
should be under the ext3 secondary indexterm, not under the last secondary
indexterm.

Comment 11 Tammy Fox 2002-05-02 19:05:54 UTC
Created attachment 56204 [details]
example with multi secondary indexterms

Comment 12 Tim Waugh 2002-05-03 07:31:54 UTC
Please take a look to see if docbook-style-dsssl-1.76-3 is any better.

Comment 13 Tammy Fox 2002-05-03 17:48:34 UTC
Yes. It looks correct now. Thanks!


Note You need to log in before you can comment on or make changes to this bug.