Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 24692 invoked from network); 18 Apr 2005 20:03:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Apr 2005 20:03:32 -0000 Received: (qmail 84980 invoked by uid 500); 18 Apr 2005 20:03:08 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 84865 invoked by uid 500); 18 Apr 2005 20:03:08 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 84813 invoked by uid 99); 18 Apr 2005 20:03:07 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of robertburrelldonkin@blueyonder.co.uk designates 195.188.213.7 as permitted sender) Received: from smtp-out4.blueyonder.co.uk (HELO smtp-out4.blueyonder.co.uk) (195.188.213.7) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 18 Apr 2005 13:03:06 -0700 Received: from knossos.elmet ([82.38.65.173]) by smtp-out4.blueyonder.co.uk with Microsoft SMTPSVC(5.0.2195.6713); Mon, 18 Apr 2005 21:03:42 +0100 Subject: Re: [betwixt] Custom bean creation From: robert burrell donkin To: Jakarta Commons Users List In-Reply-To: References: Content-Type: text/plain Date: Mon, 18 Apr 2005 21:10:02 +0100 Message-Id: <1113855002.5491.45.camel@knossos.elmet> Mime-Version: 1.0 X-Mailer: Evolution 2.0.1-1mdk Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 18 Apr 2005 20:03:42.0324 (UTC) FILETIME=[B831D340:01C54451] X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Mon, 2005-04-18 at 15:05 +0930, Lance Semmens wrote: > I'm wanting to use my own logic to instantiate beans from XML elements. > After reading the doco, it seems that the way to do this is to create a > ChainedBeanCreator and add it to the BeanCreationChain. > > I am writing my own ChainedBeanCreator but I can't see how to access the > body of an XML element in the > create(ElementMapping mapping, ReadContext context, BeanCreationChain chain) > method. > > When i say "the body of an xml element" i mean "bar" part of > "bar". betwixt is sax-based. this has several implications for the architecture. the bean creation chain stuff is intended to help solve the problem of what object to create when faced with the initial element info set. this would allow you to do something clever when faced with the element . however, being SAX, you cannot read forward to find out what the mixed content (for example 'bar') is. a different mechanism is therefore required to support object creation based on mixed content (or indeed, full info set). this is something that i've wanted to add for a long time and have a good idea how to do it but i'm unlikely to get it done any time soon. (my main priority at the moment is fixing commons-logging which is difficult and that may take quite a while.) i can give you some instructions about how you can solve your the problem in the narrow or (if you feel like contributing to betwixt), we can talk about ways to solve this problem in the general :) i'll leave it up to you... - robert --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org