title: Compare date-periods using XSLT
body: <p>I have some experience with XSLT but now i've got myself a problem:
  I need to check if a period between a begin- and enddate completely covers an other period.</p>
  
  <p>Here's a part of the xml:</p>
  
  <pre><code>&lt;Parent ID="1"&gt;
    &lt;StartDate&gt;20050101&lt;/StartDate&gt;
    &lt;EndDate&gt;20060131&lt;/EndDate&gt;
    &lt;Child ID="1"&gt;
      &lt;StartDate&gt;20050101&lt;/StartDate&gt;
      &lt;EndDate&gt;20081231&lt;/EndDate&gt;
    &lt;/Child&gt;
  &lt;/Parent&gt;
  &lt;Parent ID="2"&gt;
    &lt;StartDate&gt;20060201&lt;/StartDate&gt;
    &lt;EndDate&gt;20071231&lt;/EndDate&gt;
    &lt;Child ID="1"&gt;
      &lt;StartDate&gt;20050101&lt;/StartDate&gt;
      &lt;EndDate&gt;20081231&lt;/EndDate&gt;
    &lt;/Child&gt;
  &lt;/Parent&gt;
  &lt;Parent ID="3"&gt;
    &lt;StartDate&gt;20080101&lt;/StartDate&gt;
    &lt;EndDate&gt;20081231&lt;EndDate&gt;
    &lt;Child ID="1"&gt;
      &lt;StartDate&gt;20050101&lt;/StartDate&gt;
      &lt;EndDate&gt;20081231&lt;/EndDate&gt;
    &lt;/Child&gt;
  &lt;/Parent&gt;
  </code></pre>
  
  <p>So i need to check if the period between start and end of the Parent is fully covered by the period between start and end of the Child in XSLT and write the Parent and Child ID's to xml for fails.</p>
  
  <p>Can someone give me a head start how to manage this in XSLT...?</p>
  
  <p>I have full control over the structure of the XML so when it's easier with an other XML structure (with the same data) i can change it.</p>
  
  <p>Thanks a lot!</p>