Please see the thread "comma delimited input.how to extract value&compare " which started this morning and raises essentially the same question.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference