>In my scenario I would like to check for the existence of a folder and then iterate through its contents (basically print the file names in a loop). Is that possible with XSLT 1.0..?
No, not directly. There's no standard facility in XSLT 1.0 to access the contents of a folder.
The usual recommendation is to convert the directory listing into XML form in the calling application, and then pass it as a parameter (or even as the primary input) to the stylesheet, which can access the individual documents using the document() function.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference