allXSL.pl

  1. use Cwd;
  2. use File::Path;
  3. use File::Basename;
  4. sub directory
  5. {
  6. my (@list, $item);
  7. opendir DIR,".";
  8. @list = readdir DIR;
  9. #remove . and ..
  10. shift(@list);
  11. shift(@list);
  12. foreach $item (@list)
  13. {
  14. if (-f $item) {file($item);}
  15. if (-d $item) {
  16. chdir($item);
  17. directory($item);
  18. chdir ("..");
  19. }
  20. }
  21. }
  22. sub file
  23. {
  24. if($_[0]=~/\.xml/) {
  25. print "\n$_[0]";
  26. system "xsl $_[0] ALL NO $compare";
  27. }
  28. }
  29. if ($ARGV[0] eq "REFRESH") {$compare = 'NO';}
  30. else {$compare = 'COMPARE';}
  31. directory();
  32. system "printxsl.bat";
  33. system "printdtd.bat";
  34. system "printperl.bat";