title: How to define a Constant in XSD
body: <p>Is there a way to define a constant value and use that constant in the preceeding XSD? I have a common value I want to use for various xs:element tag's maxOccurs attributes.  Like constants in other languages, I want to make the change in one place should the value backing MyConst were to ever change.</p>
  
  <pre><code>&lt;!-- Can I do this? --&gt;
  &lt;ConstantValue id="MyConst" value="10"/&gt;
  ...
  &lt;xs:element name="sandwich_meat" type="xs:string" minOccurs="0" maxOccurs="MyConst"/&gt;
  &lt;xs:element name="sandwich_name" type="xs:string" minOccurs="0" maxOccurs="MyConst"/&gt;
  </code></pre>