XSLT 2.0 is full of features that allow you to match elements and attributes based on their type, but unfortunately there's very little help for this in 1.0.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference