xslt 2.0: read in text files via collection()
<p>I have a bunch of text files that I'd like to process witth XSLT 2.0. </p>

<p>Here's how I try to read them in:</p>

<pre><code>   &lt;xsl:variable name="input" select="collection(iri-to-uri('file:///.?select=*.txt'))" /&gt;
</code></pre>

<p>However, when I do this:</p>

<pre><code>    &lt;xsl:message&gt;
    &lt;xsl:sequence select="count($input)"/&gt;
    &lt;/xsl:message&gt;
</code></pre>

<p>It outputs 0. No files are selected.</p>

<p>If I do it like this:</p>

<pre><code>   &lt;xsl:variable name="input" select="collection(iri-to-uri('.?select=*.txt'))" /&gt;
</code></pre>

<p>I get the error that collection should return a <code>node</code> but is returning an <code>xs:string</code>.</p>

<p>What I would like do to is read each file and then iterate over each file and process the text, like this</p>

<pre><code>&lt;xsl:for-each select="unparsed-text($input, 'UTF-8')"&gt;
&lt;!-- tokenizing, etc. --&gt;
</code></pre>

<p>How would I do that?</p>