title: xpath dates comparison
body: <p>I'm trying to filter elements based on an attribute that is a date in the format <code>yyyy-MM-dd</code>.</p>
  
  <p>My XML looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;root&gt;
    &lt;article title="wired" pub-date="2010-11-22" /&gt;
    &lt;article title="Plus 24" pub-date="2010-11-22" /&gt;
    &lt;article title="Finance" pub-date="2010-10-25" /&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>My xpath attempt:</p>
  
  <pre><code>'//article[xs:date(./@pub-date) &gt; xs:date("2010-11-15")]'
  </code></pre>
  
  <p>Using xpath 2.0 - would avoid adding a schema unless absolutely necessary.</p>
  
  <p><strong>From comments</strong>:</p>
  
  <blockquote>
    <p>I believe I must be missing something
    then. Is it possible that I need to
    specify something else for xs:date to
    work? Maybe a xs: namespace
    definition?</p>
  </blockquote>