Is there XSD language support or tricks (e.g. via the preprocessor) for defining an alias for an XML element? I would like to alias all the elements in my schema in order to create an option for a more cryptic but network bandwidth-efficient version of our XML documents.
For example, I would like to define a name such as IRQ
to be an alias for the element InterruptRequest
etc.
<xs:element name="InterruptRequest" minOccurs="0">
<xs:complexType>
<xs:attribute name="level" type="xs:unsignedShort" use="required"/>
</xs:complexType>
</xs:element>
So that the following two declarations are equivalent to each other
<!-- Human readable but bandwidth inefficient -->
<InterruptRequest level="22" />
<!-- Cryptic, but comparatively bandwidth efficient -->
<IRQ level="22" />