xsl-list
[Top] [All Lists]

Re: [xsl] Creating csv from multiple input files

2008-05-06 06:37:30
Georg Hohmann wrote:

I'm using Saxon8 for the tranformation but couldn't find out how to
process multiple files on the command line. I also tried Kernow which
makes it easy to pass a folder to saxon, but i didn't manage to create
a single output file. It would be nice if someone could toss me to the
right direction. Is there a pure XSLT-solution or do i have to use
specific command-line options for saxon that i do not know?

With Saxon you can process a directory (or certain files in it) using the collection function, see http://www.saxonica.com/documentation/sourcedocs/collections.html for Saxon 9.
So you could use
<xsl:apply-templates select="collection('file:///C:/dir/subdir?select=*.xml')/*/*"/> to process all child elements of all root elements of those .xml files in the directory C:\dir\subdir.
--

        Martin Honnen
        http://JavaScript.FAQTs.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>
--~--