Recently there was an anouncement from Oleg Paraschenko:
"find with XPath over file system " at:
http://lists.xml.org/archives/xml-dev/200501/msg00466.html
This, combined with the document() and the unparsed-text() functions
provide all the necessary functionality and flexibility to find, read
and process any (permitted) text file (xml and non-xml) in the file
system.
Cheers,
Dimitre Novatchev.
On Tue, 22 Feb 2005 10:44:01 +0000,
tom(_dot_)kirkpatrick(_at_)virusbtn(_dot_)com
<tom(_dot_)kirkpatrick(_at_)virusbtn(_dot_)com> wrote:
Is it possible for xsl/xpath, via the document() function, to read in all
files in a particular directory...
Basicly I have a configuration file, which lists the directories I want to
search in which looks like so:
<config>
<category name="comments" location="/xml/articles/comments"/>
<category name="analysis" location="/xml/articles/analysis"/>
<config>
In each of those directories are a number of XML files which I would like
to process. Up untill now I have been using Perl to read the filesystem
and create an XML index file which I then use in my processing template to
access all the files within that those directories.
It would be really neet If I could just get the XSL template to look at
everyfile in the directory, and apply appropriate processing:
Something like:
<xsl:template match "/">
<xsl:variable name="config" select="document('/global/config.xml') />
<xsl:for-each select="$config/config/category(_at_)location>
<xsl:for-each select="FILEFOUND"/>
... do processing ...
</xsl:for-each>
</xsl:for-each>
</xsl:template>
where FILEFOUND represents somekind of wildcard which tells the processor
to read all files fvrom the filesystem
thanks in advance
--
Tom David Kirkpatrick
Virus Bulletin Web Developer, Virus Bulletin
Tel: +44 1235 555139
Web: www.virusbtn.com
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--