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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 9AEB6BC57 for ; Thu, 4 Nov 2010 15:37:37 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag4EALlh0kxQW+UMgWdsb2JhbACTco4EFQEBFiIivUSFRgSKVQ X-IronPort-AV: E=Sophos;i="4.58,296,1286143200"; d="scan'208";a="77103023" Received: from lo.gmane.org ([80.91.229.12]) by mail4-smtp-sop.national.inria.fr with ESMTP; 04 Nov 2010 15:37:35 +0100 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PE0wW-0003Eu-Sh for caml-list@inria.fr; Thu, 04 Nov 2010 15:37:32 +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 15:37:32 +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 15:37:32 +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 14:37:22 +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 0100,:01 le-gall:01 elt:01 val:01 wrote:01 wrote:01 parameter:02 tree:02 div:97 unit:03 star:94 thu:05 manual:06 Hello, On 04-11-2010, Till Crueger wrote: > On Thu, 04 Nov 2010 13:31:35 +0100, Sylvain Le Gall > wrote: > >> Most of the time you have an ~a parameter. >> >> Example: >> div ~a:[a_class ["statistics"]] [ h2 [pcdata "Statistics"]; ... ] > > Thanks for the help again. > Is there a place where such things are documented? Because I was not able > to figure out how to do this using the Elliom developer manual. > Well, you have to figure how nullary/.../star works. http://ocsigen.org/docu/1.3.0/XHTML.T.html#TYPEnullary All is in the type ;-) E.g. for nullary type ('a, 'b) nullary = ?a:'a attrib list -> unit -> 'b elt and val br : ([< core ], [> `Br ]) nullary and type core = [ `Class | `Id | `Title ] So you know that br accept only a_class, a_id and a_title... I would recommend you to learn by examples, because ocsigen is a big application and can be pretty hard to learn. There are already good websites around: https://github.com/mfp/ocsiblog http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=oasis-db;a=tree http://ocsigen.org/ocsimore/sources/ Regards, Sylvain Le Gall