Note that there are some explanatory texts on larger screens.

plurals
  1. POXML Schema - How can I change the name of a ref'ed element?
    primarykey
    data
    text
    <p>I'm an XML Schema noob, and this is my first Stack Overflow question. Please forgive my ignorance of standards and etiquette in both.</p> <p>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:</p> <pre><code>&lt;xs:element name="AnnoyingLongElementNameOfSuffering"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; ...sub-elements galore... &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; </code></pre> <p>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:</p> <pre><code>&lt;xsd:element name="TinyName" ref="AnnoyingLongElementNameOfSuffering"/&gt; </code></pre> <p>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.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload