From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 0474BBC37 for ; Mon, 8 Jun 2009 06:59:58 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYIACY4LEqMTaZE/2dsb2JhbACBT4xpAbtThAoF X-IronPort-AV: E=Sophos;i="4.41,322,1241388000"; d="scan'208";a="29047130" Received: from toccata.ens-lyon.fr (HELO toccata.ens-lyon.org) ([140.77.166.68]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 08 Jun 2009 06:59:58 +0200 Received: from localhost (localhost [127.0.0.1]) by toccata.ens-lyon.org (Postfix) with ESMTP id 58F4184082 for ; Mon, 8 Jun 2009 06:59:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at toccata.ens-lyon.org Received: from toccata.ens-lyon.org ([127.0.0.1]) by localhost (toccata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FJAWvzZ+fvdM for ; Mon, 8 Jun 2009 06:59:58 +0200 (CEST) Received: from pema.homeunix.org (3.139.91-79.rev.gaoland.net [79.91.139.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by toccata.ens-lyon.org (Postfix) with ESMTP id 1FB9684081 for ; Mon, 8 Jun 2009 06:59:58 +0200 (CEST) Received: from seb by pema.homeunix.org with local (Exim 4.69) (envelope-from ) id 1MDWxh-0002wP-9a for caml-list@inria.fr; Mon, 08 Jun 2009 06:59:57 +0200 Date: Mon, 8 Jun 2009 06:59:57 +0200 From: =?iso-8859-1?Q?S=E9bastien?= Hinderer To: caml-list@inria.fr Subject: Which types for representing HTML documents ? Message-ID: <20090608045957.GA7611@pema> Mail-Followup-To: caml-list@inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; ens-lyon:01 ocaml:01 variants:01 constructors:01 polymorphic:01 inline:01 represented:02 represented:02 types:05 types:05 representing:05 differences:06 suggestions:07 attributes:08 classes:08 Dear all, According to you, how could an HTML document best be represented in OCaml ? In particular: would you rather use classes or records, polymorphic variants or normal constructors ? There are attributes which can occur in several elements, such as id, class... How shold these be represented ? Should the types reflect the differences between inline elements and other types of elements ? Many thanks in advance for your suggestions, Sébastien.