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

Re: Namespaces best practice: managing dialect evolution--


xpath best practices
On Thu, 8 Nov 2001, David Carlisle wrote:

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

> 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?

In thinking about it a bit more, I believe what I'm really asking for is a
way of saying the following three things, in some standardized way, about
a particular chunk of XML:

  1) this data is written in a language coming from namespace 'X'
  2) the data syntax is consistent with version 'Y' of this language
  3) the contract implied by accepting to process this data is
     consistent with a specific contract 'Z' 

In my case I want the target application to know if the contract part (3)
has changed independent of any change in the data syntax itself, and stop
processing if it cannot obey the contract. If the contract hasn't changed,
then it should check to see if it can process the particular dialect I've
sent.

For many XML applications, (3) is likely not relevant.  

> 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.

Yes, I agree, although I wish there was a standardized or at least
accepted 'best practice' way of doing so.
 
> 
> > 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...

Reality shows that nothing is right the first time :-( What I'm looking
for is some way of making the unpleasant side effects more predictable, or
at least manageable.

I'll try this issue out on the XML protocols list also, and see if anyone
there has thought about these things.  I'm quite new to this mode for
using XML, and may be way off base with my musings :-/

Thank you very much for your thoughs on this --

Ian



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.