Skip to main content.
home | support | download

Back to List Archive

Re: What determines the default 'swishtitle'?

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Mon Oct 15 2001 - 21:50:45 GMT
At 02:37 PM 10/15/01 -0700, Roy Tennant wrote:
>At least in version 1.x, there is also a condition where a document 
>that has a <title> tag will not have that <title> tag found due to it 
>being too far down in the document. There used to be a setting in the 
>config file that would allow you to set how far down in the file (in 
>lines) SWISH-E would look for the title tag. Changing this would be 
>necessary, for example, if your documents happened to have a pile of 
>Javascript above the title tag. I was waiting for Bill to respond to 
>see if that had been removed in version 2.x, but since he didn't 
>mention it, I thought I would throw it out in case you're having that 
>problem.

No, I just forgot about that setting.  Thanks.

The html.c parser (type HTML) scans the document first for title (and also
another time for StoreDescription) before parsing the document.  I guess
for performance reasons, swish's html.c only looks some number of lines.
It's set to 12 lines by default:

  TITLETOPLINES 12

which is probably too few as a default.

libxml2 (type HTML2) parses the document only once and will find the title
regardless of how far down it is in the document.

There's also a USE_DOCPATH_AS_TITLE setting in config.h that says to use
the path name for the title if the title doesn't exist.



Bill Moseley
mailto:moseley@hank.org
Received on Mon Oct 15 21:51:57 2001