[bv-dev] Changes in BV XML schemas

Sebastian Thomschke sebastian.thomschke at web.de
Sun Jun 10 13:03:52 EDT 2012


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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev




More information about the beanvalidation-dev mailing list