OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev]Changing Namespaces Between Specification Versions

How about this really simple practical example: your application
accepts the following xml:


You know this might change, so you wonder about using a version
attribute and/or a namespace, and what that namespace should be.  (if
you do use a namespace, you want it to "brand" your xml

A few months later your application changes to accept the following xml:

  <from>customer name</from>

There are already lots of customers sending you the original xml.
What should happen here?

- Use the same namespace for both and increment a version attribute
- Use a different namespace
- Run a process over all incoming xml to convert it to the v2 format
(and only ever process that)
- Make the customer call 2 different entry points depending on the xml
they are sending (put the burden on them)
- Make your processing code accept both

Personally I would:  Use the same namespace for both, and add version
attribute to distinguish them.  I would also have two xsd's, and
validate each instance based on its version number.  This has plenty
of problems and requires the plan to be in place at the very beginning
(so your v1 xml has the right namespace and to a lesser extent the
version attribute) so it would be good to know any other approaches...

Andrew Welch
Kernow: http://kernowforsaxon.sf.net/

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS