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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id E118FBC57 for ; Thu, 4 Nov 2010 13:31:46 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag4EAJ9E0kxQW+UMgWdsb2JhbACTb44EFQEBFiIivQOFRgSKVQ X-IronPort-AV: E=Sophos;i="4.58,295,1286143200"; d="scan'208";a="77728955" Received: from lo.gmane.org ([80.91.229.12]) by mail2-smtp-roc.national.inria.fr with ESMTP; 04 Nov 2010 13:31:46 +0100 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PDyyn-0005fe-Rl for caml-list@inria.fr; Thu, 04 Nov 2010 13:31:45 +0100 Received: from avelizy-155-1-76-106.w90-2.abo.wanadoo.fr ([90.2.27.106]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 04 Nov 2010 13:31:45 +0100 Received: from sylvain by avelizy-155-1-76-106.w90-2.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 04 Nov 2010 13:31:45 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Subject: Re: Help with Elliom syntax Date: Thu, 4 Nov 2010 12:31:35 +0000 (UTC) Message-ID: References: X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: avelizy-155-1-76-106.w90-2.abo.wanadoo.fr User-Agent: slrn/pre1.0.0-18 (Linux) X-Spam: no; 0.00; le-gall:01 syntax:01 ocaml:01 wrote:01 encode:01 functions:01 parameter:02 div:97 div:97 assign:05 assign:05 blocks:07 attributes:08 object:09 actually:10 Hello, On 04-11-2010, Till Crueger wrote: > Hi, > > I am still trying to find my way with Elliom and Ocsigen. Right now I can > use OCaml to generate the pages I want, but I still have problems to > figure out how to encode the XHTML. The main question I have is how to > assign attributes to elements, > like div blocks or others. I found the a_id functions that should return > an id object, but I have not figured out how to use it to actually assign > the id. > Most of the time you have an ~a parameter. Example: div ~a:[a_class ["statistics"]] [ h2 [pcdata "Statistics"]; ... ] Regards, Sylvain Le Gall