I hacked the code for my own instance as follows.  What this does is
causes the alt tags to be indexed, but they don't show up in the
excerpts.

>From htdig/HTML.cc in the do_tag method, for the "case 18:"

            if (conf["alt"])
            {
                char    *alttxt = transSGML(conf["alt"]);
                if (doindex && in_title)
                    title << alttxt << " ";
                // -- begin kaivo - don't want alt tags showing up.
                // if (in_ref && description.length() <
max_description_length)
                //     description << alttxt << " ";
                // if (doindex && !in_title && head.length() <
max_head_length)
                //     head << alttxt << " ";
                // -- end kaivo
                char    *w = HtWordToken(alttxt);
                while (w && doindex)
                {
                    if (strlen(w) >= minimumWordLength)
                      retriever.got_word(w,
                                 int((offset+(w-alttxt)) * 1000
                                        / totlength),
                                 in_heading);
                    w = HtWordToken(0);
                }
                w = '\0';
            }


Hope this helps
-Paul


Geoff Hutchison wrote:
> 
> On Thu, 12 Apr 2001, Anthony E. wrote:
> 
> > It is coming from an empty "alt" attribute in the
> > <img> html tag.
> 
> This is, in fact, a bug.
> 
> > If I add a value for "alt=value", the word "value"
> > will show up repeatedly.
> >
> > Anyway to disable using the image "alt" tag in the
> > indexing?
> 
> This isn't a bug. Most people *want* the alt tags indexed. If you don't,
> you could try putting in a space, e.g. alt=" " or if you are willing to
> change the code, open up htdig/HTML.cc and look for:
> 
>             if (conf["alt"])
>             {
>                 char    *alttxt = transSGML(conf["alt"]);
> ...
>                 if (doindex && !in_title && head.length() < max_head_length)
>                     head << alttxt << " ";
> 
> Put "//" in front of each of the last two lines and then rebuild htdig. It
> will no longer add ALT attributes to the excerpts.
> 
> --
> -Geoff Hutchison
> Williams Students Online
> http://wso.williams.edu/
> 
> _______________________________________________
> htdig-general mailing list <[EMAIL PROTECTED]>
> To unsubscribe, send a message to <[EMAIL PROTECTED]> with 
>a subject of unsubscribe
> FAQ: http://htdig.sourceforge.net/FAQ.html

-- 
Paul Erickson       | [EMAIL PROTECTED]
Kaivo, Inc.         | www.kaivo.com

_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a 
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html

Reply via email to