W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2011

Can an attribute have an alias name?

From: <mlcook@Wabtec.com>
Date: Thu, 30 Jun 2011 09:52:29 -0400
To: <xmlschema-dev@w3.org>
Message-ID: <5D8E2FF0AB863C448ECD67FD6161ADB10474719EE1@WABTECE2007.ad.wabtec.com>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:59 UTC