Re: [xsl] collection()

Subject: Re: [xsl] collection()
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Tue, 23 Jan 2007 22:44:48 +0100
Colin Adams wrote:
In gestalt, that would be collection ('foo').
And collection() does the same thing for the current working directory.


Andrew Welch wrote:

For example - say you have 1000's of XML files in a directory and you
want to generate a report detailing the links in the dataset, you
would use the collection() function

David Carlisle wrote:
?select=*.xml;recurse=yes;on-error=ignore'

to say go down the directory tree and  ignore any non xml files (so it
doesn't fall over CVS directories:-)


Imagine I do it all "by hand" now (using an extension function to get the dir listing. Imagine!). Funny, I was put off by the "implementation defined" parts of collection() in the specs and earlier discussion on not being able retrieve the dir listing using xslt (assuming something as David shows above as not possible either). This opens up a whole new world of possibilities! And will save me a lot of time, too.

Thanks!

-- Abel Braaksma

Current Thread