To start with, unless you have actually specified the data type for startDate, it's just a string to the XML parser, and so it won't be able to make comparisons of the type you are attempting.
Assuming for the moment that you are using the Microsoft XML parser, you will need to invoke the Microsoft datatype namespace, and specify that the startDate is of type "date".
If you are able to turn this attribute into an element, then it is easier to do so, since you can then do this:
Code:
<?xml version='1.0'?>
<?xml-stylesheet type="text/xsl" href="Sample.xsl"?>
<headlines xml:space="preserve"
xmlns:dt="urn:schemas-microsoft-com:datatypes">
<startDate dt:dt="date">2002-07-12</startDate>
<otherelement>stuff here</otherelement>
</headlines>
Otherwise, if you MUST keep it as an attribute, then you have to add the namespace and datatype to your schema.
Anyway, once the datatype has been defined in this way, you should find yourself able to perform comparions in the way that you desire, although you will need to modify your current XPath expression accordingly if you have indeed turned the attribute into an element.
Bookmarks