|
From: =?iso-8859-1?Q?<jp....@ti...> - 2003-05-28 10:38:56
|
Hi Rod,=0D=0A=0D=0AHere comes my proposal in play, modified by Isabelle's= remark.=0D=0A=0D=0A<bean class=3D"MyClass" id=3D"foos" singleton=3D"fals= e>=0D=0A<property name=3D"foo">FOO</property>=0D=0A<property name=3D"foo2= " value=3D"FOO2"/>=0D=0A<property name=3D"foo3" refid=3D"foo3"/>=0D=0A<pr= operty name=3D"foo4">=0D=0A <data>FOO4.1</data>=0D=0A <data value=3D= "FOO4.2"/>=0D=0A <data refid=3D"foo4.3"/>=0D=0A</property>=0D=0A</bean= >=0D=0A<bean class=3D"MyClass2" id=3D"foo3"/>=0D=0A<bean class=3D"MyClass= 3" id=3D"foo4.3"/>=0D=0A=0D=0AI don't like very much naming the individua= l array elements "data". If anyone has a better idea.=0D=0A=0D=0AJean-Pie= rre=0D=0A=0D=0A---------- Initial Header -----------=0D=0A=0D=0AFrom = : spr...@li...=0D=0ATo = : Isabelle Muszynski <isa...@me...>=0D=0ACc : Rod Jo= hnson <rod...@in...>, springframework-developer@list= s.sourceforge.net=0D=0ADate : Wed, 28 May 2003 06:17:54 -0400=0D=0AS= ubject : Re: [Springframework-developer] Spring bean factory XML format=0D= =0A=0D=0AIsabelle, =0D=0A=0D=0AOK, we can change name -> id when defining= all beans, and use =0D=0Arefid for references.=0D=0A=0D=0AThe only probl= em I see with your syntax below...=0D=0A=0D=0A<property name=3D"thefoo" r= efid=3D"foo/>=0D=0A<property name=3D"moo">moo</property>=0D=0A=0D=0A...is= that I can't see how it would support collections. I =0D=0Asee this as a= major enhancement, possible with the original =0D=0Aproposal, that had <= value> and <ref> subelements.=0D=0A=0D=0AI can easily change the XML pars= ing for whatever we agree. =0D=0A=0D=0ARegards,=0D=0ARod=0D=0A=0D=0A> Hi = Rod,=0D=0A> =0D=0A> There is one thing I do not like about your proposed = =0D=0Asyntax: you use <ref=0D=0A> name=3D"xxx"> is used in two different = contexts, one when you =0D=0Adefine a bean=0D=0A> that can serve as a ref= erence, and once when you refer to =0D=0Asuch a bean from=0D=0A> another = bean.=0D=0A> That's confusing. It would be better to define with for ex. = =0D=0Aan id attribute,=0D=0A> and reference with a refid attribute:=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"foo/>=0D=0A> <proper= ty 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 referenced from other =0D=0Abeans,= thanks to its=0D=0A> id attribute. Bean baz cannot be referenced, becaus= e it =0D=0Adoesn't have an id=0D=0A> attribute.=0D=0A> =0D=0A> A validati= ng parser will not help you make sure that bean =0D=0Afoo really exists=0D= =0A> when referenced, and neither will a DTD.=0D=0A> =0D=0A> Isabelle=0D=0A= =0D=0A=0D=0A-------------------------------------------------------=0D=0A= This SF.net email is sponsored by: ObjectStore.=0D=0AIf flattening out C+= + or Java code to make your application fit in a=0D=0Arelational database= is painful, don't do it! Check out ObjectStore.=0D=0ANow part of Progres= s Software. http://www.objectstore.net/sourceforge=0D=0A_________________= ______________________________=0D=0ASpringframework-developer mailing lis= t=0...@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 l= e modem ADSL offert ? C'est en exclusivit=E9 chez Tiscali !=0APour profi= ter de cette offre, cliquez ici: http://register.tiscali.fr/adsl/=0AOffre= soumise =E0 conditions.=0A |