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.8 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 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 988DEBC37 for ; Wed, 30 Sep 2009 14:59:05 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8DAPLywkpQRFuwWWdsb2JhbACadQEWFb1dhCcE X-IronPort-AV: E=Sophos;i="4.44,480,1249250400"; d="scan'208";a="33867260" Received: from furbychan.cocan.org ([80.68.91.176]) by mail2-smtp-roc.national.inria.fr with ESMTP; 30 Sep 2009 14:59:05 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1Msyls-0001My-JB for caml-list@inria.fr; Wed, 30 Sep 2009 13:59:04 +0100 Date: Wed, 30 Sep 2009 13:59:04 +0100 To: caml-list@inria.fr Subject: Re: [Caml-list] xpath or alternatives Message-ID: <20090930125904.GA5126@annexia.org> References: <20090930101622.GA15517@annexia.org> <245077.49646.qm@web111516.mail.gq1.yahoo.com> <20090930115723.GL1104@annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090930115723.GL1104@annexia.org> User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; 0100,:01 ocamlduce:01 ocamlduce:01 cduce:01 compiler:01 2009:98 2009:98 wrote:01 wrote:01 caml-list:01 dependency:01 match:02 match:02 string:02 string:02 On Wed, Sep 30, 2009 at 12:57:23PM +0100, Richard Jones wrote: > On Wed, Sep 30, 2009 at 04:05:03AM -0700, Dario Teixeira wrote: > > Hi, > > > > Ocamlduce has been mentioned before in this thread, but I didn't catch > > the reason why it has been discarded as a solution. Is it because you > > don't want to carry the extra (large) dependency, or is there some other > > reason? > > Actually the reason is that I thought it wasn't available for 3.11.1, > but I just checked the website and it is, and ocamlduce does seem to > be the obvious solution for this problem. (However I'll need to try > and see if I can come up with the equivalent code). Do any cduce developers want to give me a clue here? It would seem like I need something along these lines: let devs = match xml with | {{ [[[]]] }} -> dev | {{ [[[]]] }} -> file in However according to the compiler, devs has type . In any case, I think I may need either the map or map* operator, since I want to match all, not just the first one. Rich. -- Richard Jones Red Hat