title: Element-Mandatory Attribute declaration in XSD Schema:
body: <p>I want to declare an element to be included in a complex type declaration, and the element has a mandatory attribute: "option=MyOption", <strong>but the value of the "option" attribute could be anything, depending on the context.</strong> </p>
  
  <p>That is: the attribute "option" with some unknown value should be mandatory in any document using the complex type containing this element. </p>
  
  <p>Example:</p>
  
  <pre><code>    &lt;xs:element name="SpecialOption" type="xs:string"/&gt;
  
      &lt;xs:complexType name="SpecialOptions"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element ref="SpecialOption" minOccurs="1" maxOccurs="100"/&gt;
              &lt;xs:element ref="XXX"/&gt;     
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;   
  </code></pre>
  
  <p>In this case the "SpecialOption" element in the complex type "SpecialOptions" should have this mandatory attribute.</p>
  
  <p><strong>I don't know how to declare a mandatory attribute for an element in XSD, or how to specify that the attribute must have a value that is not yet known.</strong></p>