|
From: Rob R. <rob...@ur...> - 2005-02-18 05:12:12
|
I think this is a very good idea. I think it would be attractive to
those who are turned off by the amount of XML in the Spring config
files. Another example would be the Hibernate config from the petclinic
sample app, which could have some of its config shrunk into something
like this:
<sessionFactory dataSource="dataSource">
<mappings>petclinic.hbm.xml</mappings>
<property key="hibernate.dialect">${hibernate.dialect}</property>
</sessionFactory>
<dataSource type="driverManager"
className="${jdbc.driverClassName}"
url="${jdbc.url}"
etc..
/>
I'm rusty on my XSL, but I think you could still use regular <bean>
definitions and just have templates for "special" elements.
Rob
Seth Ladd wrote:
>On Thu, 17 Feb 2005 10:18:36 -0500, David Bowers <viv...@gm...> wrote:
>
>
>>I've been thinking about an extension to the mechanism for specifying
>>XML sources for Spring beans, where you specify an XML source and an
>>XSL transform. Something like this:
>>
>> <context-param>
>> <param-name>contextConfigLocation</param-name>
>> <param-value>
>> WEB-INF/normalContext.xml,
>> WEB-INF/cusomtContext.xml | WEB-INF/transformCustomContext.xsl
>> </param-value>
>>
>>
>
>We have often wanted to do this. We have split our context files into
>domain specific contexts. Each domain is specific (DAO, web,
>security, etc). If each had their own format (internal to our needs)
>it would make reading these files much easier. Merely transforming
>them into Spring's bean DTD at runtime makes sense sometimes.
>
>Seth
>
>
>
|