|
From: Steve H. <sh...@at...> - 2004-08-27 05:01:07
|
Hi, I am a big fan of spring, but I've noticed
the design of the spring beans xml file seems
overly verbose in a few places. For example,
the common case of a property entry with a single
value:
<property name="password">
<value>${db.pw}</value>
</property>
I think this would be more clearly expressed without
the value tag:
<property name="password">${db.pw}</property>
Obviously this would mean less finger typing, but
I think the bigger advantage would be readibility,
especially in cases where those 15 characters force
a line break.
I tested adding support for this and it is possible
to do in a backward compatible way with just a small
change to XmlBeanDefinitionParser.java. Unfortunately
the required change to spring-beans.dtd seems as if
it would have to be significant (allow ANY inside property)
because of the dtd rules for mixed content.
A cleaner approach would probably be to define a separate,
alternative dtd and parser (ConciseXmlBeanDefinitionParser ?).
Additional elements could probably be eliminated at the same
time (<map><entry><value> comes to mind).
Thoughts?
Steve
|