I have been using SYDI for quite a while now. The 2.0 release of sydi-server has added some nice features, the ability to generate Word output from .xml files is huge. The only think that I found to be annoying is that the sydi-transform.vbs script does allow the input of an entire directory.
cscript.exe sydi-transform.vbs -xServer.xml -sServerhtml.xsl -oServer.html
This can make the transformation process from .xml to .html fairly labor intensive for a large environment. This little script solves that problem.
#!/usr/bin/perl -w
# syntax: perl transform.pl dir_where_xml_files_live
# e.g. – perl transform.pl ./xmlfiles
# Will walk the file system and output filename.xml.html for each .xml file
#
# Edit these variables to match the location on your system
$pathtotransform=”g:/sydi/tools/sydi-transform.vbs”;
$pathtoxsl=”g:/sydi/xml/serverhtml.xsl”;
#DO NOT EDIT BELOW THIS LINE
$dirtoget=”$ARGV[0]”;
opendir(IMD, $dirtoget) || die(“Cannot open directory”);
@thefiles= readdir(IMD);
closedir(IMD);
foreach $f (@thefiles)
{
unless ( ($f eq “.”) || ($f eq “..”) )
{
system “cscript $pathtotransform -x$f -s$pathtoxsl -o$dirtoget\/$f.html”;
}
}