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

RE: XML Schemas: Best Practices ? Versioning

  • From: "Arnold, Curt" <Curt.Arnold@h...>
  • To: "'xml-dev@l...'" <xml-dev@l...>
  • Date: Thu, 06 Sep 2001 13:02:50 -0600

xml schema message versioning
Sorry to come late to the party.  There was a pretty dense discussion on this on www-schema-comments@w... quite a while ago (maybe a year ago), see
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2000JulSep/0211.html and related messages.

Basically, I saw two cases:

1. The new schema changes the interpretation of some element, for example, a construct that was valid and meaningful for the previous schema does not validate against the new schema.  In this case,
you should change the namespace since processors that worked with the old document might do the wrong thing with a new document.

2. The new schema extends the namespace by adding new elements, etc, but does not invalidate previously valid documents.  In this case, it is appropriate to keep the old namespace since old software
could handle new documents appropriately and new software the old.

In case 2, the most appropriate way to signal what schema is appropriate is through an additional attribute on the element that introduces the namespace.  For example, if a document was valid per
version 1.0 and later of http://www.example.org/foo, it could indicate it by:

<foo:foo foo:version="1.0" xmlns:foo="http://www.example.org/foo"/>

If a document relied on elements that were defined in later versions, it could indicate it by:

<foo:foo foo:version="1.5" xmlns:foo="http://www.example.org/foo"/>

(acceptible values of foo:version in the v1.5 schema would be "1.5", "1.4", "1.3", etc)

If existing processors saw this document, they could either validate against the foo v1 schema and reject the document, or they could validate against a lax v1 compatible schema (that had a decent
amount of <xsd:any>'s) or they could skip validation.

This approach does require the schema resolution mechanism to allow access to the attributes on the namespace introducing element.

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.