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] HTMLC
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-10-04 (15:33)
From: Gerd Stolpmann <info@g...>
Subject: Re: [Caml-list] HTMLC

Am 2002.10.04 16:14 schrieb(en) Stefano Zacchiroli:
> I use WML since an year and is architecture is built up from a lot of
> layers (8 or 9 I didn't remeber), the more useful are two of them:
> - inclusion of other files, as already implemented in htmlc (even if
>   seems to me that WML does not differentiate verbatim inclusion from
>   the 'normal' one, it scans sources looking for WML special tags
>   anyway)
> - execution of embedded perl statement (obviously I'm talking about
>   execution at compile time, WML philosophy is the same as HTMLC one)
> What about adding such a feature to HTMLC?
> I don't know how hard is to implement such a feature, I can wonder that
> it require the instantiation of an ocaml runtime while starting the
> compiler, and an 'eval' like statement execution each time some ocaml
> code is encountered. I know that Gerd Stoplmann is doing something like
> that in PXP (embedding ocaml code in XML document), but I haven't yet
> looked at it ...

What do you mean? I have never done something like this. Maybe you mix it
up with one of the following ideas:

- PXP supports some kind of "class selection". Depending of the name of the
  XML/HTML element, different classes can be instantiated to represent the
  element in the object tree
- In WDialog it is possible to bind ocaml code at various stages of
  page processing in order to customize the actions. The XML/HTML document and
  the ocaml code are connected by various kinds of binding tags.
  It is part of the philosphy to separate the HTML markup from the algorithm
  generating the HTML blocks from input data.

Neither of these concepts need the ocaml compiler at runtime, but I have
dynamic HTML pages in mind, so calling the compiler would be a bad idea
(security, performance, etc.).
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: