Hi,

yes, versioning via an XML namespace would also be a possible approach.

Independent from the chosen approach, my question more was when we should create a new distinguishable schema version:

a) with the next schema change we make (so this would be BV 1.1)
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)

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.

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.

--Gunnar

2012/6/10 Sebastian Thomschke <sebastian.thomschke@web.de>:
> How about using a versioned namespace, e.g. like in maven?
>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
>
>
> Interesting readings:
> http://www.xfront.com/Versioning.pdf
> http://www.ibm.com/developerworks/xml/library/x-tipnamsp/index.html
> http://stackoverflow.com/questions/2014237/what-are-the-best-practices-for-versioning-xml-schemas
>
> Seb
>
> On 10.06.2012 18:16, Gunnar Morling wrote:
>> Hi all,
>>
>> I'd be interested in your opinion on BVAL-295 [1].
>>
>> The background is that for BV 1.1 there will be some additions to the
>> BV XML descriptors and thus the corresponding XSD files (e.g. new
>> element "parameter-name-provider" in validation.xml).
>>
>> While implementing method validation within the RI, Hardy and I asked
>> ourselves whether there should be an explicit version attribute in the
>> descriptor root element (similar e.g. to JPA's persistence.xml):
>>
>> <validation-config
>>      xmlns="http://jboss.org/xml/ns/javax/validation/configuration"
>>      xmlns:xsi="..."
>>      xsi:schemaLocation="..."
>>      version="1.1">
>>      ...
>> </validation-config>
>>
>> This attribute would have a fixed value defined in the schema, which
>> would allow to unambiguously identify the BV version for which an XML
>> descriptor was written.
>>
>> As long as all schema changes are backwards compatible (meaning any
>> files written against the 1.0 schemas are also valid against the new
>> schemas), there is not really the need for such a version attribute,
>> as always the new schema files could be used for validation. Things
>> look different, though, in case of incompatible changes. Then the
>> schema to validate against could be determined using the version
>> attribute.
>>
>> Personally I feel we should add such an attribute once we really have
>> an incompatible change (maybe in a future BV revision), but maybe
>> there are other opinions?
>>
>> --Gunnar
>>
>> [1] https://hibernate.onjira.com/browse/BVAL-295
>> _______________________________________________
>> beanvalidation-dev mailing list
>> beanvalidation-dev@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>
>
> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev