Well it is common in jaxb to rewrite/ignore/route using the namespace and it is very few code - all EE does that for ex, so not a big deal at all IMHO. If models are close enough the same graph can be used with some conditional properties else it is two distinct tree and mapper - but this is required whatever the choice on the namespace will be cause we want model version 4.1.0 anyway. So overall I think technically there is no issue using a namespace or modelVersion - both are strictly equivalent and require the same effort on consumer side. XSLT are also not needed, just generate both models from the xsd and map them all to the a single one a pivot format (as "usual").
So from my window the topic you mention is not namespace or modelVersion but really 4.0.0 or 4.1.0 and think we all agreed we go with 4.1.0 so we are just good to move forward right? Romain Manni-Bucau @rmannibucau <https://x.com/rmannibucau> | .NET Blog <https://dotnetbirdie.github.io/> | Blog <https://rmannibucau.github.io/> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book <https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064> Javaccino founder (Java/.NET service - contact via linkedin) Le ven. 3 avr. 2026 à 14:19, Martin Desruisseaux < [email protected]> a écrit : > Le 03/04/2026 à 13:43, Romain Manni-Bucau a écrit : > > > Have to admit it is not clear for me why since in any case the models > > differ and JAXB supports everything in both cases. > > > For JAXB, if the namespace are not the same, then they are not mapped to > the same Java objects. We get two set of Java classes, one for each > version. This is reasonable if the two versions have little in common. > If, on the contrary, the two versions are very similar (which is our > case for the POM), this is a lot of duplication. Assuming that the Java > code is designed for the latest version, we have to copy all data from > the old objects to the new objects, which is tedious. Alternatively we > can create interfaces implemented by both set of classes, but this is > tedious as well. Finally we can use XSLT for converting the old schema > to the new one on the fly at JAXB unmarshalling time. All those > solutions work but are more difficult than keeping the same namespace > with only new objects added and no change in the objects that existed in > the previous version. > > Martin > >
