Pseudo Markup Tags for Libht

Pseudo markup tags are standard looking markup tags which libht interprets for various purposes. They are never inserted into the output document, but instead control the document's environment, amongst other things. All of libht's psuedo markup tags are prefixed by a '$'.

<$mark target>
set a mark target for later calls to htgotomark().
<$date>
insert the current date into the output document.
<$include filename>
include the filename into current document. This should be a standard part of @!()*#&& HTML, but isn't for no known reason.
<$table name>
Start a table definition. Name is how you refer to this table with htgettabledef(). Note that this doesn't insert a table into the output document, but instead defines a template of the table which may be later inserted into the document.
<$if variable[=value]> ... [<$else>] ... <$/$if>
$if allows for conditional inclusion of parts of a document. Without the value clause, $if works much like the C preprocessor construct #ifdef, ie somebody defined it, regardless of its value.

$if is lame! It really needs some relational operators One day I'll get around to fixing this.

Caveat: $if is not text based, and cannot deal with iff'ing out syntactically relevant markup elements (ie things like tables, forms, etc). If you want to have two different actions for a form, say, based on a debug variable, say, you must not $if just the form tag -- it will not do what you hope. Consider, using variable expansion in the tag itself.
<$set variable=value>
$set does the obvious thing: sets the variable to the given value.
Note: By defining variables, you can insert them into markup tags too. This is quite useful for debugging situations where you want to run a different program, say in a form based on some variable. In order to do this, I have a block of $set's in the head of the document. For example:
      <$set action=/cgi-bin/HotFlesh>      
      <$if debug>      
      <$set action=/debug/HotFlesh>
      </$if>
      
      [...]

      <form action=$action>

      

© (copyright) 1997 MTCC
Last modified: Sun Jun 15 16:22:30 PDT 1997