Welcome
 Revisions
 Downloads »
 FAQ
 Tutorials »
 Reference »

The hitop FAQ

Hitop

Why is this HTML preprocessor called hitop?
It was inspired by the HTML preprocessor htp. I added two extra letters and turned it into the name of a shoe.
Why write a replacement for htp then?
I used htp for a while to maintain websites but had problems with some bugs and inconsistent features.
I've already used htp - how similar is hitop?
Superficially quite similar. Hitop's markup looks more like real HTML. Hitop does not have all of the features of htp and vice versa.
Is the source for hitop available?
Yes. Read the licence agreement to find out what you can and can't do with it.

HitopLive

How do I make .live files work with hitoplive in apache?

You need apache installed with mod_actions, and hitoplive in your cgi-bin directory (or somewhere that it can be run from the web). Running it directly (to test that it's installed) should give you a "No PATH_TRANSLATED set. Are you sure this is cgi?" error.

You also need to either be able to add mime-bindings either through .htaccess, or through the config files. Historically, we've always used .live to signify hitoplive files, although any extension (including .hitop) can be used. The appropriate lines for .htaccess or httpd.conf are:
AddType application/x-httpd-hitoplive .live
Action application/x-httpd-hitoplive /cgi-bin/hitoplive
where .live is the extension you've chosen, and /cgi-bin/hitoplive is altered according to your setup.

The plugins searched for in each directory named in the hitop library path (space seperated), which can be set by (and in order of priority):

  1. a <@HITOP LIBS="xxx"> directive at runtime
  2. the contents of the environment variable HITOPLIBS
  3. the default of "$HOME/.hitop /usr/local/lib/hitop /usr/lib/hitop"
of course, when run as cgi, $HOME will probably not be reliable. :)

The plugins (.so)'s should be copied to one of these directories, and marked read/executable by the web server user.

My sysadmin wont install mod_actions or AddType doesn't work from .htaccess. Can I still use hitoplive?
Yes, but it becomes less pleasant for the end user. If you have the hitoplive cgi installed at, for example:
http://www.yourdomain.com/cgi-bin/hitoplive
and a page that you want to display at:
http://www.yourdomain.com/widgets/blue/details.live
then instead use the following url:
http://www.yourdomain.com/cgi-bin/hitoplive/widgets/blue/details.live

Input

Htp fills in WIDTH and HEIGHT of <IMG> elements where it can. Does hitop do the same?
Yes.
How does hitop handle whitespace?
Hitop converts all whitespace characters to spaces, folds multiple spaces to single spaces, then removes spaces from between markup.
Is there any markup that hitop cannot handle?
Yes. Because of the way hitop compresses whitespace, you cannot reliably use <PRE>. This is no great loss.
How can I overload HTML markup so that it can refer to the unoverloaded version?
It's not uncommon to want to do this. Precede the name with a hash. For example <@DEF NAME="P"><#P ALIGN="JUSTIFY"></@DEF>. Here, of course, a stylesheet would be the best solution.
Why has all of hitop's markup suddenly had an at-sign inserted into it?
To ensure it doesn't clash with future HTML extensions.
So can I put an at-sign in my procedure calls?
No.

Output

Why is hitop's output formatted like that?
Before version 0.10, hitop would output its HTML stream unformatted on a single line. It now uses layout rules to produce something more humanly readable. The output formatting is unrelated to the input formatting.
Hitop says that there is an error in the format of my navigation file. It looks OK, what could be wrong?
The most common cause is a blank line at the end of the file.
Hitop now gives warnings for the structure of the HTML it's outputting. But why is it so pedantic?
To ensure that your HTML will work in as many browsers as possible. Although the HTML spec says that close elements are optional on many constructions, far too many browsers will break badly without them. Therefore hitop is far stricter than the spec requires.

Last updated 2001-01-04