[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML Schemas: Best Practices ? Versioning

  • From: Tony.Coates@r...
  • To: xml-dev@l...
  • Date: Thu, 06 Sep 2001 11:29:35 +0100

w3c schema versioning

Let me start by saying that the comments about trying to avoid changing old instance documents with information about new Schema versions is too usage specific.  I would argue that old Schema versions should be available for validating documents against those versions, and applications should be able to rely on those old versions existing.  The idea that you will want to use the new Schema version for all legacy documents is very much an author-side wish, not an application-side wish, as has already been pointed out.  So more fleshing out is needed about the "rights" of an instance document to be validated against the Schema version that it was created for.  To continue with the rest,

On 05/09/2001 18:50:52 Mary Pulvermacher wrote:

>1. CHANGING THE SCHEMA VERSION ATTRIBUTE
> [ ... ] However, the validator ignores this field.

Yes, so #1 won't work unless you do a quick pre-parse and choose the Schema based on the version number.  Not out of the question, but a nuisance until you get set up for it.  One way to make this work is to have a RDDL document at the namespace URI, and in that document have the URIs for each Schema version.

>2. CHANGING THE SCHEMA'S TARGET NAMESPACE

I have had a number of discussions with MSMCQ about this, and the W3C view seems to be that this is not the way to go, as one namespace can correspond to many Schemas (and/or versions).  In particular, this is the result of the "3 Schemas, 1 namespace" decision for HTML.  In the purist view, the namespace is only for defining unique element names, and while different Schemas will use those element names in different structures, the names themselves often don't evolve as much as the Schemas.

From a practical point of view, changing the namespace can seem to be the only workable approach, since the "schemaLocation" is not required and can be ingnored.  Again, MSMCQ argues that the optionality of "schemaLocation" was intended to be the exception, and not the rule.  This has been confused by some validators ignoring the "schemaLocation" by default, but the point here is that while #2 can work, it is certainly not the W3C's annointed approach, and does risk conflict with future W3C specs.

>3. CHANGING THE NAME OF THE SCHEMA
>4. CHANGING THE LOCATION OF THE SCHEMA

These two seem to be the same, except that they focus on different parts of the schema location URI.  This would seem to be the W3C approved way to do it.  To make it work, what you need is to use some like an XML Catalog entity resolver that will let you redirect the "schemaLocation" URI to your local copy of the required version of the Schema.  Thus, the schemaLocation takes on the role of an identifier rather than an actual Schema location, and might even by a public ID URN of the form "urn:publicId:...".

So, I would suggest that #3/4 is the way to go, in spite of #2's appeal as the quick and dirty way to get something up and running.

     Cheers,
          Tony.
========
Anthony B. Coates
(1) Content Distribution Architect - Project Gazelle
(2) Leader of XML Architecture & Design - Chief Technology Office
Reuters Plc, London.
Tony.Coates@r...
========



-----------------------------------------------------------------
        Visit our Internet site at http://www.reuters.com

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.