This is very straightforward with an xsl:choose element, and doesn't require any extensions.
This stylesheet
01
02
03
04
05
06
07
08
09
10
11
12
Applied to this XML data
10-JAN-2013
04-JUL-1776
31-DEC-1999
Produces this output
20130110
17760704
19991231