|
From: <jue...@we...> - 2004-06-25 17:06:11
|
Any thoughts on include/import directives in XML bean definition files? http://opensource.atlassian.com/projects/spring/browse/SPR-137 This is about elements in XML bean definitions that allow to include = other XML bean definition files, with paths that are interpreted as = relative to the current file. Basically, this is an alternative to = combining multiple XML bean definition files via "contextConfigLocation" = parameters. =20 Remaining questions are mostly about syntax. One possibility would be = like as follows: =20 <beans> =20 <include resource=3D"includeBeans.xml"/> =20 <bean.../> =20 </beans> =20 Should the tag be called "include" or "import"? Any suggestions or = objections regarding such functionality in general? I'm personally still = a fan of "contextConfigLocation", but I guess there are valid use cases = for keeping includes directly in bean definition files. =20 As a side note, one can already use standard XML entity includes to = achieve something similar. However, such include files are not full = DTD-compliant XML files themselves, and the XML include syntax is rather = awkward. =20 <?xml version=3D"1.0" encoding=3D"UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" = "http://www.springframework.org/dtd/spring-beans.dtd = <http://www.springframework.org/dtd/spring-beans.dtd> " [ <!ENTITY contextInclude SYSTEM = "org/springframework/web/context/WEB-INF/contextInclude.xml"> ]> <beans> =20 &contextInclude; =20 <bean.../> =20 </beans> =20 I'd like to clarify our way to proceed with this ASAP, to get it into = 1.1 RC1 if we decide to adopt it. =20 Juergen |