|
From: Aleksei G. <ne...@ka...> - 2004-10-07 13:31:50
|
On Thu, 7 Oct 2004 15:09:01 +0200, jürgen höller [werk3AT] <jue...@we...> wrote: > Another request to simply <property> usage in XML bean definitions: > > http://opensource.atlassian.com/projects/spring/browse/SPR-379 > > This time, it's not about considering CDATA inside > <property>...</property> as value, but rather about further attributes > for the <property> tag itself: > > <property name="user" value="admin"/> > <property name="linkFormatter" bean="linkFormatter"/> > > I'd probably name the bean reference attributes differently, i.e. > "ref-bean" respectively "ref-local". But the general idea is not bad - > it's cleaner than the CDATA-as-value suggestion, I guess. > > Let's compare the currently necessary markup: > > <property name="user"><value>admin</value></property> > <property name="linkFormatter"><ref bean="linkFormatter"/></property> > > Which is clearly more verbose, even if not too much. The main advantage > of the attribute version is that it avoids closing tags completely. > > Thoughts? This is really good idea - better than CDATA-as-value with even less typing - and we still will have pretty strict DTD! -- //regards, neuro |