title: Can XSD add a constraint for comparing two elements?
body: <p>Can XSD add a constraint for comparing two elements ?
  Say I have Begin End under DataRangeType I want to add a constraint saying <code>Begin &lt;= End</code>. Is this doable ?</p>
  
  <p>BTW I am using XMLSpy 2013.</p>
  
  <pre><code>&lt;xs:complexType name="DataRangeType"&gt;
      &lt;xs:sequence&gt;
          &lt;xs:element name="Begin" type="xs:date"/&gt;
          &lt;xs:element name="End" type="xs:date"/&gt;
      &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
  </code></pre>
  
  <p>Thanks a lot.</p>