title: How to share an annotation across multiple elements
body: <p>I have this in my XSD (excerpt):</p>
  
  <pre><code>&lt;xs:choice maxOccurs="unbounded" minOccurs="0"&gt;
    &lt;xs:element name="int1"&gt;
      &lt;xs:complexType&gt;
        &lt;xs:complexContent&gt;
          &lt;xs:extension base="baseStructMember"&gt;
            &lt;xs:attribute name="min" type="xs:byte" use="optional" /&gt;
            &lt;xs:attribute name="max" type="xs:byte" use="optional" /&gt;
            &lt;xs:attribute name="step" type="xs:byte" use="optional"&gt;
              &lt;xs:annotation&gt;
                &lt;xs:documentation xml:lang="en"&gt;
                  *** Description of the step goes here. ***
                &lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
            &lt;/xs:attribute&gt;
          &lt;/xs:extension&gt;
        &lt;/xs:complexContent&gt;
      &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
    &lt;xs:element name="int2"&gt;
      &lt;xs:complexType&gt;
        &lt;xs:complexContent&gt;
          &lt;xs:extension base="baseStructMember"&gt;
            &lt;xs:attribute name="min" type="xs:short" use="optional" /&gt;
            &lt;xs:attribute name="max" type="xs:short" use="optional" /&gt;
            &lt;xs:attribute name="step" type="xs:short" use="optional" /&gt;
          &lt;/xs:extension&gt;
        &lt;/xs:complexContent&gt;
      &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
    &lt;xs:element name="int4"&gt;
      &lt;xs:complexType&gt;
        &lt;xs:complexContent&gt;
          &lt;xs:extension base="baseStructMember"&gt;
            &lt;xs:attribute name="min" type="xs:int" use="optional" /&gt;
            &lt;xs:attribute name="max" type="xs:int" use="optional" /&gt;
            &lt;xs:attribute name="step" type="xs:int" use="optional" /&gt;
          &lt;/xs:extension&gt;
        &lt;/xs:complexContent&gt;
      &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
  &lt;/xs:choice&gt;
  </code></pre>
  
  <p>I want to add annotation to <code>step</code> attributes. As you see, I added it in <code>int1</code>. All <code>step</code> attributes (also in <code>int2</code>, <code>int4</code>...) are of different types, but have same meaning, so the annotation should be same.</p>
  
  <p>Is there any way I could share one annotation across all <code>step</code> attributes?</p>
  
  <p>Or define <code>step</code> externally, together with annotation and reuse it (like with <code>attributeGroup</code>), but allow for different attribute types?</p>