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

Re: Namespaces best practice: managing dialect evolution--


Re:  Namespaces best practice: managing dialect evolution--

> Here you could use the namespace to 'flag' the old from the new. 

`flag' isn't though the right word to use for such a drastic step.
You can (as does XSLT for example) have a version attribute mandated to
be at the top level element and can then specify what your processors
are supposed to do when seeing a document in a higher or lower version
than they expect.

But if you change the namespace then you just have so completely changed
the language that a whole class of tools simply can not easily work with
both languages at the same time. That may be what you want, but if it is
that big a change, is it really the same language any more?

For example any application accessing your documents by XPath (say xslt,
or an XPath enabled DOM implementation) then all your XPath's will fail
on the new (or old) language. It's not particularly easy to change an
Xpath expression to work with both languages, so if you update your
application, this is a really hard update and you no longer can process
the old language at all (with the new tool). It seems a lot more useful
that you stay in the same namespace but have conditional code in your
processor depending on a version attribute.


> But that just seems so ugly and arbitrary, I am rather hoping there's a
> better way....

No, versioning languages always has unpleasant side effects whatever you
do. The only good solution is to get it right first time and never
change, but that's not always easy to achieve...

David


_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

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.