|
From: Isabelle M. <isa...@me...> - 2003-05-28 10:32:56
|
HI Rod, Do it the way JP suggested : <bean id="foo"> <property name="moo">moo</property> <property name="coll"> <element refid="alpha"> <element refid="beta> </property> </bean> Isabelle On Wed, May 28, 2003 at 06:17:54AM -0400, rod...@in... wrote: > Isabelle, > > OK, we can change name -> id when defining all beans, and use > refid for references. > > The only problem I see with your syntax below... > > <property name="thefoo" refid="foo/> > <property name="moo">moo</property> > > ...is that I can't see how it would support collections. I > see this as a major enhancement, possible with the original > proposal, that had <value> and <ref> subelements. > > I can easily change the XML parsing for whatever we agree. > > Regards, > Rod > > > Hi Rod, > > > > There is one thing I do not like about your proposed > syntax: you use <ref > > name="xxx"> is used in two different contexts, one when you > define a bean > > that can serve as a reference, and once when you refer to > such a bean from > > another bean. > > That's confusing. It would be better to define with for ex. > an id attribute, > > and reference with a refid attribute: > > > > <bean name="foo" id="foo"/> > > <bean name="bar" id="bar"> > > <property name="thefoo" refid="foo/> > > <property name="moo">moo</property> > > </bean> > > <bean name=baz> > > <property name="bla">blabla</property> > > </bean> > > > > Note that bean bar can in turn be referenced from other > beans, thanks to its > > id attribute. Bean baz cannot be referenced, because it > doesn't have an id > > attribute. > > > > A validating parser will not help you make sure that bean > foo really exists > > when referenced, and neither will a DTD. > > > > Isabelle > > > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your application fit in a > relational database is painful, don't do it! Check out ObjectStore. > Now part of Progress Software. http://www.objectstore.net/sourceforge > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > -- Isabelle Muszynski Software Engineer Zandweellaan 4 2660 Antwerpen Belgium Tel. 32-(0)3-830 18 54 Mobile: 32-(0)485 49 50 89 Email: isa...@me... Website: www.meta-logix.com |