[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: Mon, 10 Sep 2001 15:26:08 -0600

xsl versioning
Title: Message
Actually, option 1 and 1.5 aren't alternatives, they are two parts of one solution.  When you have the case 2 (the namespace really hasn't changed, the corresponding schema has been extended). you actually need both parts.  Adding the version attribute into the instance document allows the instance generator/author to declare the earliest version that the instance document is compatible with.  The version attribute within the schema could be used to declare the version of the schema.
 
This pattern can be seen within XSLT and SVG where there is a "version" attribute on the <xsl:transform> or <svg:svg> element to indicate what version of XSLT or SVG is in use.  At this time, there is only one legal value for version for these namespaces, however it implies that future versions of XSLT and SVG may keep the same namespace but add new values for the version attribute.  Current v1 processors are required to fail when presented with a later version attribute, however some tools (like an XSLT documentation tool) much think that it is reasonable to process just what it recognizes of a v2 document.
 
For greatest interoperability, you would only want to specify version="2.0" if you were using some version 2.0 features in your document and use version="1.0" otherwise.
 
In the case where you are making breaking changes to a definition, you have no choice but to use a distinct namespace at least for the breaking changes.  For example, if SVG 2 decided the interpretation of <rect> needed to change, but everything else in SVG 2 was upward compatible with SVG 1, there could be a new namespace just for <rect>:
 
<svg xmlns=http://www.w3.org/2000/svg version="2.0" xmlns:svg2="http://www.example.org/bogusuri">
    <!--   svg 1.0 rect, draws a rectangle    -->
    <rect x="10" y="20" width="20" height="20"/>
    <!--   svg 2.0 rect, draws rectanglasaurus    -->
    <svg2:rect x="10" y="20" width="30" height="20"/>
</svg>
 
 

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.