Re: [xsl] Multiple input files

Subject: Re: [xsl] Multiple input files
From: S Woodside <sbwoodside@xxxxxxxxx>
Date: Tue, 30 Sep 2003 03:07:17 -0400
Should be able to do it with the unix xargs command.


On Monday, September 29, 2003, at 08:23 AM, David.Pawson@xxxxxxxxxxx wrote:

Perhaps others who read this list in 98/99 can help,
#but I thought that if the input file to xt was a directory,
then each .xml file in that directory was processed?

regards DaveP

My question is how to read all the xml files in one
directory as input
files to my XSL file?

Why not do this in Perl, and let Perl call the XSLT engine for every file? Or do you need to do XSLT over all files simultaneously?

Below a little Perl to only process files in the current
directory  who start
with the content of the -f commandline variable. Instead of print "+";
you can place the command to XSLT one file using whatever XSLT
engine supporting commandline running.


  if ( $option{f} ) {                  # -f = only files starting with
      print "... Converting $option{f} procedures to HTML:\n";
      @filestodo = <$option{f}*>;
      print "@filestodo \n";
      foreach $file (@filestodo) {
         print "+";
      print "\n--> Found " . scalar(@filestodo) . " files to do.\n";
      return \@filestodo;

-- :: :: 99% Devil, 1% Angel

XSL-List info and archive:

Current Thread