>is there anyway to test if a value is in xs:dateTime format?
$value castable as xs:dateTime
>I am also looking to test if an optional element is contained within the input XML?
<xsl:if test="x">
where x is a path expression that will select the element if it's present.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference