|
From: <rod...@in...> - 2003-05-28 10:17:57
|
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 |