xsl-list
[Top] [All Lists]

Re: Multiple input files

2003-09-30 00:07:17
Should be able to do it with the unix xargs command.

simon

On Monday, September 29, 2003, at 08:23 AM, David(_dot_)Pawson(_at_)rnib(_dot_)org(_dot_)uk 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.

Cas

  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 \(_at_)filestodo;
   }




--
www.simonwoodside.com :: www.openict.net :: www.semacode.org
                    99% Devil, 1% Angel


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>