|
From: =?iso-8859-1?Q?<jp....@ti...> - 2003-05-28 11:03:51
|
Hi Juergen,=0D=0A=0D=0AI don't agree. The element passes a value, directl= y or by reference. But the job is the same. Making the difference in the = used attribute will suffice. There is no nature difference between the tw= o cases. Having a coherent collection (only one kind of sub-elements) sho= uld take precedence. =0D=0AIf a reference element should have much more p= articular properties, the scenario could be the other way, but still it's= not.=0D=0A=0D=0AJean-Pierre=0D=0A =0D=0A=0D=0A---------- Initial Header = -----------=0D=0A=0D=0AFrom : springframework-developer-admin@lists.= sourceforge.net=0D=0ATo : <spr...@li...= eforge.net>=0D=0ACc : =0D=0ADate : Wed, 28 May 2003 12:41:3= 9 +0200=0D=0ASubject : RE: [Springframework-developer] Spring bean factor= y XML format=0D=0A=0D=0AWhat about mixing references and values in a coll= ection? Would it look as follows:=0D=0A=0D=0A<bean id=3D"foo">=0D=0A <pro= perty name=3D"moo">moo</property>=0D=0A <property name=3D"coll">=0D=0A <= element refid=3D"alpha"/>=0D=0A <element refid=3D"beta"/>=0D=0A <elemen= t>gamma</element>=0D=0A </property>=0D=0A</bean>=0D=0A=0D=0ARod's propose= d syntax would be like this:=0D=0A=0D=0A<bean id=3D"foo">=0D=0A <property= name=3D"moo">moo</property>=0D=0A <property name=3D"coll">=0D=0A <ref = refid=3D"alpha"/>=0D=0A <ref refid=3D"beta"/>=0D=0A <value>gamma</val= ue>=0D=0A </property>=0D=0A</bean>=0D=0A=0D=0AI tend to prefer the latter= , as it clearly separates references and values.=0D=0A=0D=0AJuergen=0D=0A= =0D=0A=0D=0A-----Original Message-----=0D=0AFrom: Isabelle Muszynski [mai= lto:isa...@me...]=0D=0ASent: Wednesday, May 28, 2003 12:33 PM=0D= =0ATo: rod...@in...=0D=0ACc: springframework-developer@lis= ts.sourceforge.net=0D=0ASubject: Re: [Springframework-developer] Spring b= ean factory XML format=0D=0A=0D=0A=0D=0AHI Rod,=0D=0A=0D=0ADo it the way = JP suggested :=0D=0A=0D=0A<bean id=3D"foo">=0D=0A <property name=3D"moo">= moo</property>=0D=0A <property name=3D"coll">=0D=0A <element refid=3D"al= pha">=0D=0A <element refid=3D"beta>=0D=0A </property>=0D=0A</bean>=0D=0A= =0D=0AIsabelle=0D=0A=0D=0AOn Wed, May 28, 2003 at 06:17:54AM -0400, rod.j= oh...@in... wrote:=0D=0A> Isabelle, =0D=0A> =0D=0A> OK, we can= change name -> id when defining all beans, and use =0D=0A> refid for ref= erences.=0D=0A> =0D=0A> The only problem I see with your syntax below...=0D= =0A> =0D=0A> <property name=3D"thefoo" refid=3D"foo/>=0D=0A> <property na= me=3D"moo">moo</property>=0D=0A> =0D=0A> ...is that I can't see how it wo= uld support collections. I =0D=0A> see this as a major enhancement, possi= ble with the original =0D=0A> proposal, that had <value> and <ref> subele= ments.=0D=0A> =0D=0A> I can easily change the XML parsing for whatever we= agree. =0D=0A> =0D=0A> Regards,=0D=0A> Rod=0D=0A> =0D=0A> > Hi Rod,=0D=0A= > > =0D=0A> > There is one thing I do not like about your proposed =0D=0A= > syntax: you use <ref=0D=0A> > name=3D"xxx"> is used in two different co= ntexts, one when you =0D=0A> define a bean=0D=0A> > that can serve as a r= eference, and once when you refer to =0D=0A> such a bean from=0D=0A> > an= other bean.=0D=0A> > That's confusing. It would be better to define with = for ex. =0D=0A> an id attribute,=0D=0A> > and reference with a refid attr= ibute:=0D=0A> > =0D=0A> > <bean name=3D"foo" id=3D"foo"/>=0D=0A> > <bean = name=3D"bar" id=3D"bar">=0D=0A> > <property name=3D"thefoo" refid=3D"fo= o/>=0D=0A> > <property name=3D"moo">moo</property>=0D=0A> > </bean>=0D=0A= > > <bean name=3Dbaz>=0D=0A> > <property name=3D"bla">blabla</property>= =0D=0A> > </bean>=0D=0A> > =0D=0A> > Note that bean bar can in turn be re= ferenced from other =0D=0A> beans, thanks to its=0D=0A> > id attribute. B= ean baz cannot be referenced, because it =0D=0A> doesn't have an id=0D=0A= > > attribute.=0D=0A> > =0D=0A> > A validating parser will not help you m= ake sure that bean =0D=0A> foo really exists=0D=0A> > when referenced, an= d neither will a DTD.=0D=0A> > =0D=0A> > Isabelle=0D=0A> =0D=0A> =0D=0A> = -------------------------------------------------------=0D=0A> This SF.ne= t email is sponsored by: ObjectStore.=0D=0A> If flattening out C++ or Jav= a code to make your application fit in a=0D=0A> relational database is pa= inful, don't do it! Check out ObjectStore.=0D=0A> Now part of Progress So= ftware. http://www.objectstore.net/sourceforge=0D=0A> ___________________= ____________________________=0D=0A> Springframework-developer mailing lis= t=0D=0A> Spr...@li...=0D=0A> https://l= ists.sourceforge.net/lists/listinfo/springframework-developer=0D=0A> =0D=0A= > =0D=0A=0D=0A-- =0D=0AIsabelle Muszynski=0D=0ASoftware Engineer=0D=0AZan= dweellaan 4=0D=0A2660 Antwerpen=0D=0ABelgium=0D=0ATel. 32-(0)3-830 18 54=0D= =0AMobile: 32-(0)485 49 50 89=0D=0AEmail: isa...@me...=0D=0AWe= bsite: www.meta-logix.com=0D=0A=0D=0A=0D=0A------------------------------= -------------------------=0D=0AThis SF.net email is sponsored by: ObjectS= tore.=0D=0AIf flattening out C++ or Java code to make your application fi= t in a=0D=0Arelational database is painful, don't do it! Check out Object= Store.=0D=0ANow part of Progress Software. http://www.objectstore.net/sou= rceforge=0D=0A_______________________________________________=0D=0ASpring= framework-developer mailing lis...@li...= rceforge.net=0D=0Ahttps://lists.sourceforge.net/lists/listinfo/springfram= ework-developer=0D=0A=0D=0A=0D=0A----------------------------------------= ---------------=0D=0AThis SF.net email is sponsored by: ObjectStore.=0D=0A= If flattening out C++ or Java code to make your application fit in a=0D=0A= relational database is painful, don't do it! Check out ObjectStore.=0D=0A= Now part of Progress Software. http://www.objectstore.net/sourceforge=0D=0A= _______________________________________________=0D=0ASpringframework-deve= loper mailing lis...@li...=0D= =0Ahttps://lists.sourceforge.net/lists/listinfo/springframework-developer= =0D=0A=0A=0A********** SPECIAL ADSL **********=0AL'ADSL =E0 partir de 15,= 95 EUR/mois et le modem ADSL offert ? C'est en exclusivit=E9 chez Tiscal= i !=0APour profiter de cette offre, cliquez ici: http://register.tiscali.= fr/adsl/=0AOffre soumise =E0 conditions.=0A |