>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?
where x is a path expression that will select the element if it's present.
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference