activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Endre StĂžlsvik <Apa...@stolsvik.com>
Subject Re: [VOTE] change the namespace URI in 5.0 onwards to map to spring URIs
Date Fri, 15 Jun 2007 18:14:18 GMT
Elliotte Harold wrote:
> Versions in namespace are a common XML antipattern. They are rarely a good
> idea, as changing the namespace URI from one version to the next is 
> rarely a
> good idea, and certainly doesn't happen as often as changing the schema.
> Namespaces should not be used for versioning. The W3C TAG has spent a 
> lot of
> time on this. See:
> 
> See http://www.w3.org/2001/tag/doc/versioning-xml
> 

Which part of it is particularly relevant to the discussion at hand?

My suggestion, in the earlier thread, was that if you wanted to go down 
a completely new route, then you could change the namespace URI (and 
potentially really the namespace tag too!), so that it was clear that 
this is a completely new config.

If you simply evolve the old config, then stick with the old namespace 
and the old namespace URI, but change the location.
   Spring have done a good job here, at least as I've understood it (I 
didn't come to that table before the 2 was in the pipes, so I haven't 
used the previous, but..). They apparently used a dtd previously, and a 
pretty verbose config. Then in the 2, they started using schema, and 
included lots of shortcuts and new styles to the XML, but are fully 
backwards compatible: you may use the old reference to the dtd, and then 
obviously be restricted to the spring 1 stuff, or use the new schema, 
and then use both the 1.0 style, or the new and better (easier) style.

But isn't it nevertheless a good idea to be version-specific on the 
location reference? If the config is fully backwards compatible, then 
you may "redirect" any old references to 4.1.0 and 4.1.1 and such, to 
the 5.0 schema, using multiple lines in spring.schemas.

This is Spring 2.0.5's spring.schemas.

http\://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd
http\://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd
http\://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd
http\://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd
http\://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd
http\://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd
http\://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd

http\://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd
http\://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd
http\://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd
http\://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-2.0.xsd
http\://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd
http\://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd
http\://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd


This is 2.1 (M2):

http\://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd
http\://www.springframework.org/schema/aop/spring-aop-2.1.xsd=org/springframework/aop/config/spring-aop-2.1.xsd
http\://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-2.1.xsd
http\://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd
http\://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd
http\://www.springframework.org/schema/context/spring-context-2.1.xsd=org/springframework/context/config/spring-context-2.1.xsd
http\://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-2.1.xsd
http\://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd
http\://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd
http\://www.springframework.org/schema/jms/spring-jms-2.1.xsd=org/springframework/jms/config/spring-jms-2.1.xsd
http\://www.springframework.org/schema/jms/spring-jms.xsd=org/springframework/jms/config/spring-jms-2.1.xsd
http\://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd
http\://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd
http\://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd
http\://www.springframework.org/schema/tx/spring-tx-2.1.xsd=org/springframework/transaction/config/spring-tx-2.1.xsd
http\://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-2.1.xsd
http\://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd
http\://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd
http\://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd
http\://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd


Notice how they (Spring), as James suggest, have an unversioned 
"sliding" reference (I'm not sure how much I like that), but then they 
also have the old 2.0 version sticking around inside the jar. I guess 
they have some (probably minor, I'd presume) incompatible change in the 
2.1, so that they couldn't just let the 2.0 reference point to the 2.1 
XSD - OR they simply want any config that specify 2.0 XSD, but then uses 
2.1 features, to fail upon startup - as it is if you specify the old dtd 
(which is how it should be, in my opinion - be explicit and strict!).

Notice also that they don't mess around with new XSDs on the revisions. 
The XSD has been called 2.0 for the whole 2.0.x cycle, and are now 
apparently being upgraded to 2.1. This is also very good - stay 
consistent for a good period at a time. If you have some new features 
that absolutely need new XSD, then bump the minor version then!

Oh well..

This is at any rate so much better than earlier - these small elements 
probably doesn't matter much..

Thanks for the fix (finally!),
Kind regards,
Endre.

Mime
View raw message