changing xml schema definitions ?

Cantor, Scott cantor.2 at osu.edu
Tue Mar 12 14:53:27 EDT 2013


On 3/12/13 2:12 PM, "Tom Zeller" <tzeller at dragonacea.biz> wrote:

>I think I would like to change an xml schema definition, which should
>be backwards compatible, and I am wondering if that is okay.
>
>While porting the spring wiring for the scripted attribute definition,
>I want to change
>
> <attribute name="language" type="string">
>
>to
>
> <attribute name="language" type="string" default="javascript">
>
>so that the default value of the language attribute is controlled by
>the xsd rather than the bean definition parser. Thus the following can
>be removed from the bean definition parser, to keep it simpler :

We actually intentionally stopped using defaults in schemas because it
creates some problems figuring out in the code what's happening. It also
creates problems with signed documents, which is less of an issue here,
but we have config files that we anticipated wanting the ability to sign.

It would be ok to mention the default in the schema as an annotation
(that's the XSD kind, not the Java kind), but I'm fairly set against using
defaults themselves. We still have a few, I think, but I really hate them.
I particularly hate the ones that default in the bean IDs in some places.

>Not sure how we version those xsd's though. I guess that is my real
>question, how do we version the xsd's ?

XSD has no versioning mechanism whatsoever. The only way you have is
changing the namespace.

It does have a non-normative "version" attribute in the <schema> element
that for documentation purposes I have used in the SP to note the software
version in which it last changed.

-- Scott




More information about the dev mailing list