XML Schema - How can I change the name of a ref'ed element?

I'm an XML Schema noob, and this is my first Stack Overflow question. Please forgive my ignorance of standards and etiquette in both.

In an XML Schema file (.xsd), I'm including another schema (outside of my control) that represents a sort of de facto standard my group is using. Within the external schema is a complex element with a long name:

<xs:element name="AnnoyingLongElementNameOfSuffering">
    <xs:complexType>
        <xs:sequence>
            ...sub-elements galore...
        </xs:sequence>
    </xs:complexType>
</xs:element>

In my schema file, the element in question was copied, which I consider bad practice, and it was given an abbreviated, tiny name. What I'm trying to do is replace the copied code with a reference to the original in the other schema, but I need to maintain the tiny name, which is already used in existing instance files (also outside of my control). I'd like to do something like:

<xsd:element name="TinyName" ref="AnnoyingLongElementNameOfSuffering"/>

However, the 'name' and 'ref' attributes are mutually exclusive. I can't re-define it and re-list the sub elements, because they're not declared globally in the other schema. I can't make a derived type, because it's defined as an element in the other schema not a type. Alas, none of my searches have yielded anything helpful, presumably because you'd normally change the element name or modify the other file, neither of which is an option for me. There's probably a simple answer, so I look forward to your enlightening responses.

8
задан Vitamin Smooth 10 May 2011 в 19:08
поделиться