Can an attribute have an alias name?

One of our specification documents has changed, and one result is that there has been some renaming of data fields.

We have lots of XML files that use elements with attributes named according to the previous specification document.

In order to avoid editing all of those files, I was wondering whether there was a simple schema change that would allow using old and new names for the same attribute.

An existing element might be:
<action name="forward" />

Using the new naming scheme, the element would be
<action new-name="forward" />

But I don't want to allow both "name" and "new-name" in the same element.

The XSL transformation would need to be able to handle both names, also.

(Using the old names for the new data fields isn't a crisis, but it would be nice to be able to use new names as well.  In the long run we could perform a big scripted edit of all the files.  They're under source control, so we'd just get another file version.)

Any suggestions?

Thanks,
Mike Cook

This email and any attachments are only for use by the intended recipient(s) and may contain legally privileged, confidential, proprietary or otherwise private information.  Any unauthorized use, reproduction, dissemination, distribution or other disclosure of the contents of this e-mail or its attachments is strictly prohibited.  If you have received this email in error, please notify the sender immediately and delete the original.

Received on Friday, 1 July 2011 05:32:59 UTC