<p>Within an XSLT document, is it possible to loop over a set of files in the current directory?</p>

<p>I have a situation where I have a directory full of xml files that need some analysis done to generate a report.  I have my stylesheet operating on a single document fine, but I'd like to extend that without going to another tool to merge the xml documents.  </p>

<p>I was thinking along these lines:</p>

<pre><code>&lt;xsl:for-each select="{IO Selector Here}"&gt;
    &lt;xsl:variable select="document(@url)" name="contents" /&gt;
    &lt;!--More stuff here--&gt;
&lt;/xsl:for-each&gt;
</code></pre>

I don't think XSL is set up to work that way: it's designed to be used by something else on one or more documents, and the something else would be responsible for finding files to which the XSLT should be applied.
If you had one main document and a fixed set of supporting documents, you could possibly use the
```
document()
```
function
to return specific nodes and/or values, but I suspect your case is different.