RE: How to Version XML Applications

The W3C cannot give you guidance on versioning because as Tim and Norm
have accurately pointed out even within the W3C there are different
guidelines used for versioning XML vocabularies. For instance XSLT uses
a version attribute while most likely W3C XML Schema will be versioned
by changing the namespace URI. I agree with Len's subsequent email and
will throw in my $0.02 from an article I wrote a while back[0] 

Versioning and Namespaces
-------------------------
There are two primary mechanisms used in practice to create different
versions of an XML instance document. One method is to use a version
attribute on the root element as is done in XSLT, while the other method
is to use the namespace name of the elements as the versioning
mechanism. Versioning based on namespaces is currently very popular,
especially with the W3C, who have used this mechanism for various XML
technologies including SOAP, XHTML, XML Schema, and RDF. The namespace
URI for documents that are versioned using the namespace is typically in
the following format:

      http://my.domain.example.org/product/[year/month][/area]

The primary problem with versioning XML documents by altering the
namespace name in subsequent versions is that it means XML
namespace-aware applications that process the documents will no longer
work with the documents, and will have to be upgraded. This is primarily
beneficial with document formats whose versions change infrequently, but
upon changing alter the semantics of elements and attributes, thus
requiring that all processors no longer work with the newer versions for
fear of misinterpreting them. 

On the other hand, there are a number of scenarios where an XML document
versioning mechanism based on a version attribute on the root element is
sufficient. A version attribute is primarily beneficial when changes in
the document's structure are backwards compatible. The following
situations are all areas where using a version attribute is a wise
choice: 

* Semantics of elements and attributes will not be altered. 
* Changes to the document involves the addition of elements and
attributes, but rarely removal. 
* Interoperability between applications with various versions of the
processing software is necessary. 


Both versioning techniques are not mutually exclusive and can be used
simultaneously. For instance, XSLT uses both a version attribute on the
root element, as well as a versioned namespace URI. The version
attribute is used for incremental, backwards-compatible changes to the
XML document's format, while altering the namespace name is done for
significant changes in the semantics of the document. 

[0]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexxml
/html/xml05202002.asp

-- 
PITHY WORDS OF WISDOM 
Reality's the only obstacle to happiness..       

This posting is provided "AS IS" with no warranties, and confers no
rights. 

>  
>  
> -----Original Message-----
> From: Anthony B. Coates [mailto:abcoates@TheOffice.net] 
> Sent: Wednesday, September 11, 2002 12:42 PM
> To: www-tag
> 
> 
> ** Reply to message from Tim Bray <tbray@textuality.com> on 
> Wed, 11 Sep 2002
> 07:44:36 -0700
> 
> > I also am generally dubious about using namespaces to 
> version, to the 
> > extent that it might be worth considering an architectural 
> principle 
> > that this is a bad idea.
> 
> The problem is, how do you avoid using namespaces for 
> versioning?  This is a real problem that a great many people 
> have, and need guidance on (ideally from the W3C).  CMSMQ 
> argues that HTML already has set the policy, by have 3 
> versions in the one namespace.  So the namespace is not 
> versioned, the schema is.
> However, W3C XML Schemas only "hint" at schema locations, and 
> so the only positive piece of identifying information that 
> you have is the namespace URI.
> If that isn't versioned, how to you tell which version is 
> being referred to?  I'm yet to invent or read a solution that 
> I find sufficiently robust and convincing.
> 
> 	Cheers,
> 		Tony.
> ====
> Anthony B. Coates, Information & Software Architect 
> mailto:abcoates@TheOffice.net MDDL Editor (Market Data 
> Definition Language) http://www.mddl.org/
> 
> 

Received on Wednesday, 11 September 2002 16:48:32 UTC