[Home] [By Thread] [By Date] [Recent Entries]
Your last question --- quote ---
Is often handled in the realm of a scripting language such as bash, cmd, xmlsh, xproc etc. I *might* be able to be handled in "pure xslt" but I certainly dont know xslt enough to suggest a way. Maybe an xslt expert on this list could comment. It also depends on what you mean by "changed". Changed wrt to what ? Date ? Another XML file in a different directory ? Suppose you mean "changed in XML content from a source file in a different directory" ... Suppose your 2 directories are /before and /after In xmlsh for example the script might read # xmlsh script cd /after
for file in *.xml ; do
if ! xcmp -x -n /before/$file $file ; then
xslt -f the_xslt_file.xsl < $file > /wherever_it_goes/$file
fi
done
#Note this test (xcmp) checks the infoset equivilence of the XML files not their exact byte equivilence. Omitting the -x will check for byte equivilence. Similar examples could be done in other languages. But an advantage to an xml scripting language (like xmlsh or xproc) is that the script execution and the xslt execution are done in the same JVM improving performance vastly from a language that needs a subprocess to run the xslt. David A. Lee dlee@xxxxxxxxxxx http://www.calldei.com http://www.xmlsh.org 812-482-5224
|

Cart



