From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA25091; Wed, 9 Apr 2003 19:04:27 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA25127 for ; Wed, 9 Apr 2003 19:04:26 +0200 (MET DST) Received: from ontosoft.com ([209.101.228.108]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id h39H4PX09827 for ; Wed, 9 Apr 2003 19:04:25 +0200 (MET DST) Received: (qmail 30137 invoked by uid 1001); 9 Apr 2003 17:03:09 -0000 Date: Wed, 9 Apr 2003 12:03:09 -0500 From: Fred Yankowski Cc: "'Liste CAML'" Subject: Re: mixing different languages (was: RE: [Caml-list] dynamic HTML pages) Message-ID: <20030409170309.GA30017@ontosoft.com> References: <036001c2fdc6$522084d0$0a00a8c0@gateway> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Spam: no; 0.00; yankowski:01 ontosys:01 caml-list:01 monniaux:01 zope:01 python:01 templating:01 caching:01 keyid:01 449345:01 deerpath:01 batavia:01 60510:01 9461,:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, Apr 08, 2003 at 02:28:50PM +0200, David Monniaux wrote: > Are there any text editors that are aware of such mixed programs? Emacs has an available MMM package -- Multiple Major Modes -- that applies different modes to different sections of any given file based on patterns that define the different language regions. It works fairly well with, for example, PHP code embedded in HTML, presenting the PHP code with php-mode and the HTML code with an html mode, using the font-coloring and other mode-specific view and behavior specific to each mode in the particular regions. That said, I now try for a strict separation of imperative code and HTML code, so that my HTML template files have no language specific code and contain only formal parameters and markings of optional and repeated blocks of HTML content. I haven't used OCaml to generate HTML pages, but that's the approach I would want there too. The "Zope Page Templates" used in the Zope/python webserver framework are particularly elegant implementation of this approach, doing all templating in a slightly enhanced version of XHTML. But they are slow (absent caching) because of the XML parsing required. -- Fred Yankowski fred@ontosys.com tel: +1.630.879.1312 OntoSys, Inc PGP keyID: 7B449345 fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners