Re: Can an attribute have an alias name?

Michael Kay <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
> The best solution i.m.o. is to write a little XSLT that transforms old 
> files into new ones, copying everything except for the attributes that 
> changed name, and replacing the latter ones. If the new version has a 
> different namespace, updating it can also be done at the same 
> time.This is much easier than doing a mass scripted edit of all files.

Agreed. Whenever you have to deal with two variants of the same 
vocabulary, for whatever reason, my recommendation is to never to write 
any program (even a schema) that tries to deal with both variants. 
Instead write a converter (or two converters, one in each direction) and 
insert these into your processing pipeline when needed.

There are many benefits in this approach: the conversion code is highly 
reusable, and it can be dropped easily when it is no longer needed, 
avoiding the problem of maintaining programs that are full of 
conditional logic for handling situations that no longer arise.

Michael Kay
Saxonica
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.