What I am doing and still try to implement is parse this directory into a set of xml file like: from a very big file: bigfile.xml, now you create a set of xml file ranging from 0.xml to n.xml. Using a for loop now, you can read it one by one. one more good thing is that, by using a hashtable during parsing, you can&nbsp; make your algorithm run faster.<br><br><br>-----------------<br><br><br><br><b><i>Michael Kay &lt;mike@saxonica.com&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <br>&gt;Is there anyway to do something like:<br>    for $x in collection("xmlfiles")<br>where 'xmlfiles' is a subdirectory containing the actual xml files I want to<br><br>use?  I would need to know the exact syntax, as this is all new to me.<br><br><br>As others have said, the interpretation of the URI passed to collection() is<br>very much processor-dependent. Altova have their own XQuery processor, and
 I<br>would imagine it treats collection() in the same way as their XSLT<br>processor: in their 2007 product that's effectively a null implementation,<br>in the 2008 version it does roughly the same as Saxon: you can either<br>specify a directory name, or the name of an XML file that acts as a catalog<br>of the collection. IIRC, they don't provide the ability to filter the<br>contents of the directory.<br><br>Michael Kay<br>http://www.saxonica.com/<br><br><br>_______________________________________________<br>talk@x-query.com<br>http://x-query.com/mailman/listinfo/talk<br></blockquote><br><p>&#32;__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com