title: xml problem with <attribute ref="...">
body: <p>i have an xml schema</p>
  
  <pre><code>&lt;xs:complexType&gt;
  ...
  &lt;xs:attribute ref="unaryOperator"&gt;&lt;/xs:attribute&gt;
  &lt;/xs:complexType&gt;
  
  
  &lt;xs:attribute name="unaryOperator"&gt;
  </code></pre>
  
  <p>
      
       
       
      
     
    </p>
  
  <p>i try to use it in my xml file
  like this</p>
  
  <pre><code>  &lt;inv_constraint unaryOperator="not"&gt;
  </code></pre>
  
  <p>The editor gives me this error:</p>
  
  <p>Description Resource Path Location Type
  [Xerces] cvc-complex-type.3.2.2: Attribute 'unaryOperator' is not allowed to appear in element 'inv_constraint'.
  @see: <a href="http://www.w3.org/TR/xmlschema-1/#cvc-complex-type" rel="nofollow noreferrer">http://www.w3.org/TR/xmlschema-1/#cvc-complex-type</a> abc.xml /prova line 28 XML Problem</p>
  
  <p>the editor suggest i do it like this</p>
  
  <pre><code>&lt;inv_constraint xmlns:ns1="http://abc/abcd" ns1:unaryOperator="not" &gt;
  </code></pre>
  
  <p>if i don't use the ref in the xml schema and just copy paste the attribute instead of referencing it, then my xml file works, </p>
  
  <p>so my question is how can i make valid my xml without that weird tag and keep the ref in the xml schema?</p>