Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 40182 invoked from network); 14 Nov 2003 17:52:53 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 14 Nov 2003 17:52:53 -0000 Received: (qmail 43242 invoked by uid 500); 14 Nov 2003 17:52:44 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 42919 invoked by uid 500); 14 Nov 2003 17:52:42 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 42900 invoked from network); 14 Nov 2003 17:52:42 -0000 Received: from unknown (HELO poros.telenet-ops.be) (195.130.132.44) by daedalus.apache.org with SMTP; 14 Nov 2003 17:52:42 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by poros.telenet-ops.be (Postfix) with SMTP id 3CD402E6A3E for ; Fri, 14 Nov 2003 18:52:45 +0100 (MET) Received: from yum.ot (D5774E46.kabel.telenet.be [213.119.78.70]) by poros.telenet-ops.be (Postfix) with ESMTP id CFC402E69F8 for ; Fri, 14 Nov 2003 18:52:44 +0100 (MET) Subject: Re: [Woody] Datatypes revisited From: Bruno Dumon To: dev@cocoon.apache.org In-Reply-To: References: <33734.10.0.0.5.1068776244.squirrel@ags01.agsoftware.dnsalias.com> <1068802122.4077.17.camel@yum.ot> <33998.10.0.0.5.1068816011.squirrel@ags01.agsoftware.dnsalias.com> Content-Type: text/plain Organization: Outerthought Message-Id: <1068832230.8151.62.camel@yum.ot> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 14 Nov 2003 18:50:30 +0100 Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Fri, 2003-11-14 at 17:03, Sylvain Wallez wrote: > Antonio Gallardo wrote: > > >Bruno Dumon dijo: > > > > > >>The convertors in Woody are for translating between string and object > >>representations. > >> > >>It has been proposed before to add some casting methods to the > >>datatypes, for example: > >>http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=106776875918689&w=2 > >> > >> > > > >Thanks Bruno for your answer. > > > >I saw the mail yesterday. Thanks for the link. Now, I am willing to do > >that, but need your help. > > > >The receipt of this: > > > >1- As Sylvain suggested I will add 2 new methods to the Datatype interface. > >2-Add this methods in o.a.c.woody.binding.ValueJXPathBinding > > > > > > I had a deeper look at JXPath, and this doesn't seem to be so easy, as > JXPath doesn't provide us a way to know the type of the data that has to > be set. > > Furthermore, JXPath relies on an internal type conversion mechanism in > TypeUtils, which can be extended with a TypeConverter. But this > TypeUtils accepts only one TypeConverter, which is stored in a static > variable !! Hmm, maybe best to fix that in JXPath. I think ideally we should be able to provide a custom TypeConvertor on each setValue call. -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center bruno@outerthought.org bruno@apache.org