<p>Hi,</p>
<p>yes, versioning via an XML namespace would also be a possible approach. </p>
<p>Independent from the chosen approach, my question more was when we should create a new distinguishable schema version:</p>
<p>a) with the next schema change we make (so this would be BV 1.1)<br>
b) with the next incompatible schema change we make (there is none so far in BV 1.1, so this might be a future revision)</p>
<p>I'm leaning towards b), as I don't think there is a real advantage of creating a new schema version (by means of a version attribute or a namespace) in case of compatible changes and it spares BV implementors from having to handle several schema versions at the same time.</p>
<p>In any case I think we have to provide the new schema (also if the change is backwards-compatible) under a new name (“ validation-configuration-1.1.xsd“), so users have the old and new version available, e.g. for content assist in their IDE.</p>
<p>--Gunnar</p>
<p>2012/6/10 Sebastian Thomschke <<a href="mailto:sebastian.thomschke@web.de">sebastian.thomschke@web.de</a>>:<br>
> How about using a versioned namespace, e.g. like in maven?<br>
><br>
> <project xmlns="<a href="http://maven.apache.org/POM/4.0.0">http://maven.apache.org/POM/4.0.0</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" xsi:schemaLocation="<a href="http://maven.apache.org/POM/4.0.0">http://maven.apache.org/POM/4.0.0</a> <a href="http://maven.apache.org/xsd/maven-4.0.0.xsd">http://maven.apache.org/xsd/maven-4.0.0.xsd</a>"><br>
><br>
><br>
> Interesting readings:<br>
> <a href="http://www.xfront.com/Versioning.pdf">http://www.xfront.com/Versioning.pdf</a><br>
> <a href="http://www.ibm.com/developerworks/xml/library/x-tipnamsp/index.html">http://www.ibm.com/developerworks/xml/library/x-tipnamsp/index.html</a><br>
> <a href="http://stackoverflow.com/questions/2014237/what-are-the-best-practices-for-versioning-xml-schemas">http://stackoverflow.com/questions/2014237/what-are-the-best-practices-for-versioning-xml-schemas</a><br>
><br>
> Seb<br>
><br>
> On 10.06.2012 18:16, Gunnar Morling wrote:<br>
>> Hi all,<br>
>><br>
>> I'd be interested in your opinion on BVAL-295 [1].<br>
>><br>
>> The background is that for BV 1.1 there will be some additions to the<br>
>> BV XML descriptors and thus the corresponding XSD files (e.g. new<br>
>> element "parameter-name-provider" in validation.xml).<br>
>><br>
>> While implementing method validation within the RI, Hardy and I asked<br>
>> ourselves whether there should be an explicit version attribute in the<br>
>> descriptor root element (similar e.g. to JPA's persistence.xml):<br>
>><br>
>> <validation-config<br>
>> xmlns="<a href="http://jboss.org/xml/ns/javax/validation/configuration">http://jboss.org/xml/ns/javax/validation/configuration</a>"<br>
>> xmlns:xsi="..."<br>
>> xsi:schemaLocation="..."<br>
>> version="1.1"><br>
>> ...<br>
>> </validation-config><br>
>><br>
>> This attribute would have a fixed value defined in the schema, which<br>
>> would allow to unambiguously identify the BV version for which an XML<br>
>> descriptor was written.<br>
>><br>
>> As long as all schema changes are backwards compatible (meaning any<br>
>> files written against the 1.0 schemas are also valid against the new<br>
>> schemas), there is not really the need for such a version attribute,<br>
>> as always the new schema files could be used for validation. Things<br>
>> look different, though, in case of incompatible changes. Then the<br>
>> schema to validate against could be determined using the version<br>
>> attribute.<br>
>><br>
>> Personally I feel we should add such an attribute once we really have<br>
>> an incompatible change (maybe in a future BV revision), but maybe<br>
>> there are other opinions?<br>
>><br>
>> --Gunnar<br>
>><br>
>> [1] <a href="https://hibernate.onjira.com/browse/BVAL-295">https://hibernate.onjira.com/browse/BVAL-295</a><br>
>> _______________________________________________<br>
>> beanvalidation-dev mailing list<br>
>> <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
><br>
><br>
> _______________________________________________<br>
> beanvalidation-dev mailing list<br>
> <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a></p>