[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xml-dev] 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.