Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
How do I make sure that a date literal is in proper format before passing it to functions such as "fn:adjust-dateTime-to-timezone" ?
Such functions throw an exception if the value does not confirm to a valid date literal.
I need a graceful way of finding out if the value is in incorrect format so that I can proceed without calling the function.
This is exactly what the "castable as" operator is for:
if ($input castable as xs:dateTime)