I am an XML noob schema and this is my first question. Please forgive my ignorance of standards and etiquette in both.
In the XML Schema file (.xsd), I include another schema (outside my control), which is a kind of de facto standard that my group uses. Inside the external circuit 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>
This instance was copied in my schema file, which I think is bad practice, and it has been given an abbreviated tiny name. What I'm trying to do is replace the copied code with a link to the original in a different scheme, but I need to keep a tiny name that is already used in existing instance files (also out of my control). I would like to do something like:
<xsd:element name="TinyName" ref="AnnoyingLongElementNameOfSuffering"/>
However, the attributes 'name' and 'ref' are mutually exclusive. I cannot override it and enumerate helper elements because they are not globally declared in another schema. I cannot create a derived type because it is defined as an element in another schema, not a type. Alas, none of my searches brought anything useful, apparently because you usually change the name of the element or change another file, none of which is an option for me. There is probably a simple answer, so I look forward to your educational answers.
source share