From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 9B00FBBBB for ; Thu, 2 Mar 2006 16:04:21 +0100 (CET) Received: from li13-37.members.linode.com (li13-37.members.linode.com [69.93.127.37]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k22F4KV0003422 for ; Thu, 2 Mar 2006 16:04:21 +0100 Received: from li13-37.members.linode.com (localhost [127.0.0.1]) by li13-37.members.linode.com (Postfix) with ESMTP id BCFEF48A4D for ; Thu, 2 Mar 2006 16:04:17 +0100 (CET) Received: from [10.0.4.145] (mail.info.vub.ac.be [134.184.2.2]) by li13-37.members.linode.com (Postfix) with ESMTP id 5637248A49 for ; Thu, 2 Mar 2006 16:04:17 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v746.2) Content-Transfer-Encoding: 7bit Message-Id: <3AC7E3A7-AF6C-433A-916C-D3B884A76B0B@defraine.net> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: caml-list@yquem.inria.fr From: Bruno De Fraine Subject: Toy implementation of Zope's TAL for OCaml Date: Thu, 2 Mar 2006 16:04:14 +0100 X-Mailer: Apple Mail (2.746.2) X-AV-Checked: ClamAV using ClamSMTP on li13-37 X-Miltered: at nez-perce with ID 44070974.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 camlp:01 renders:01 preprocess:01 type-checked:01 camlp:01 parameters:02 parameters:02 attribute:02 bruno:03 bruno:03 readme:03 generated:05 precompiled:05 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Hello, I made a toy implementation of Zope's TAL (Template Attribute Language) for OCaml, conveniently named 'Octal'. It is built on top of Camlp4 and Xml-Light. The purpose of TAL is to have a template that is a valid XML or HTML document that already renders like the resulting document. The approach employed by Octal is to preprocess the TAL template and produce an OCaml function that takes the template parameters and that returns the generated XML document. As such, the template is precompiled into an evaluated form and template parameters can be type-checked by OCaml. Octal is realized as a Camlp4 quotation. Source code and a README with more information is available from: http://ssel.vub.ac.be/svn-gen/bdefrain/octal/ Best regards, Bruno De Fraine