recusive subdirectory suggestion
Friday, 13 July 2012 · 2 messages
KC
Kurt Conrad13 Jul 2012 09:35 #
First, I just downloaded and used BaseX to audit and report a variety of parent contexts across a set of about 2,500 XML documents. It was very painless. Many thanks.
Second, I couldn't find a way to prevent recursive indexing of subdirectories. If the feature doesn't exist, it would be handy. In my case, I had the current set of files in the selected directory and old versions in subdirectories.
Thanks, again.
/s/ kwc 2012.07.12 22:34
___________________________________________________________________ Kurt Conrad
mailto:conrad at SagebrushGroup.com
www.SagebrushGroup.com
MS
Michael Seiferle13 Jul 2012 10:15 #
Dear Kurt,
thanks for the Kudos and thanks for your suggestion as well. As a quick solution you could do the following (entirely in XQuery ;-)):
Use
file:list($dir, false(), "*.xml") [1] to retrieve a sequence of files without recursing into a subdirectory. Then either
(1) Iterate over this sequence and perform your analysis on the fly or
(2) create a database containing only the matching files and perform the analysis afterwards
For (1) and (2) see this GIST: https://gist.github.com/8488e895c5f73ac4de49
I hope this helps :-)
Kind regards
Michael
[1] http://docs.basex.org/wiki/File_Module#file:list
[2] https://gist.github.com/8488e895c5f73ac4de49Quoted text · Kurt Conrad · 18 lines
Am 13.07.2012 um 07:35 schrieb Kurt Conrad: > First, I just downloaded and used BaseX to audit and report a variety of parent contexts across a set of about 2,500 XML documents. It was very painless. Many thanks. > > Second, I couldn't find a way to prevent recursive indexing of subdirectories. If the feature doesn't exist, it would be handy. In my case, I had the current set of files in the selected directory and old versions in subdirectories. > > Thanks, again. > > /s/ kwc 2012.07.12 22:34 > > ___________________________________________________________________ > Kurt Conrad > mailto:conrad at SagebrushGroup.com > www.SagebrushGroup.com > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Written for BaseX 7.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery