Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Printing text with holes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-09-29 (21:48)
From: Pierre Weis <pierre.weis@i...>
Subject: Re: [Caml-list] Printing text with holes
> Martin Jambon wrote:
> > Hello,
> > 
> > I am curious to know what people use to print long text written in a
> > natural language, and containing many holes, like dynamically generated
> > web pages.

I just use htmlc, which is simple and efficient:

It uses $identifiers as you suggested, + some Server Side Includes
expansions, + local environment definition facilities, + what you
would like to add to it in the future :)

Here is a brief excerpt of the Changes file:

1.20 (Documents environment variables expansion)
 - Inside documents variables of the form $X, $(X), or ${X} are
   considered to be bound in the Htmlc's global environment hash table
   and expanded as their corresponding string associated value.
 - New -e argument to load environment files that set up Htmlc's
   global environment table. Environment files are list of lines
   that contain a variable name and an associated string (following
   Caml' lexical conventions).
 - New server side directive: the line
   <!--#include environment="filename"-->
   in a document loads environment file ``filename'' and enriches the
   global environment accordingly.
 - New -s compilation flag to expand .shtml files into .html files.

1.10 (User's environment variables expansion)
 - Throughout documents passed to htmlc, tags of the form <$X>
   are considered to reference the variable X in the user's
   gloabal environment: <$HOME> is thus replaced by the string
   representation of the user's HOME directory.
   (This expansion mechanism is disabled when including verbatim

Hope this helps,

Pierre Weis

INRIA, Projet Cristal,,

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: