Hi,

The magic is the spring.schemas inside camel-spring.jar, it always map the namespace to the local camel-spring.xsd inside camel-spring.jar, so that both http://camel.apache.org/schema/spring/camel-spring.xsd and http://camel.apache.org/schema/spring/camel-spring-2.8.0.xsd works here, but use http://camel.apache.org/schema/spring/camel-spring.xsd is better as you needn't change your router configuration file when camel version changes.

Freeman
On 2011-8-24, at 下午9:50, bvahdat wrote:

Hi,

I'm bit confused regarding the schemaLocation both by camel as well as
spring.

Reading at [1] it says:
/
You need to add Camel to the schemaLocation declaration
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
/
But as an example if I'm riding on camel 2.8.0 shouldn't I correctly use the
following schemaLocation declaration instead:

/http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring-2.8.0.xsd
/
As for example the complex type "keyManagersParametersFactoryBean" is first introduced by camel 2.8.0 (see [2]), and if I would make a usage of it in my spring-xml-configuration, how should that type be resolved / checked at runtime through the xml validating parser (via spring ApplicationContext
initialization)?

On the other hand spring documentation itself at [3] says that

/The 'xsi:schemaLocation' fragment is not actually required...
/
So my question is how the schemaLocation magic really works at runtime in general, for example as the SAX-Validating-Parser goes over it while the spring initialization happens through the ClassPathXmlApplicationContext
initialization / instantiation?

[1] http://camel.apache.org/spring.html
[2] http://camel.apache.org/camel-configuration-utilities.html
[3]
http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/xsd-config.html#xsd-config-body-referencing

Regards, Babak

--
View this message in context: 
http://camel.465427.n5.nabble.com/What-is-the-correct-camel-s-schemaLocation-tp4730506p4730506.html
Sent from the Camel - Users mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com









Reply via email to