I'm handling a task in which .java, .xslt, .bat and .properties files are involved.
Idea: to transform an xml-based file with extension tmx into a txt file, using xslt. Java is used as a kind of medium, connecting .properties and xslt. In the properties file, some parameters are appointed.
xml=abc.tmx xsl=aaa.xsl output=bbb.txt
The bat file acts as a launcher:
java -Xms512m -Xmx768m -DentityExpansionLimit=2000000 -classpath . transformations.TMXTransform
As you can imagine I have to modify the properties file for each processing, with only one output generated, which is not ideal in terms of efficiency.
Now I'd like to have a better solution.
all files in a specific location with specific extension are detected automatically, say a.tmx, b.tmx, c.tmx....z.tmx
And with one double-click, corresponding txt output files with customizable filename,say a_output.txt, b_output.txt...z_output.txt) are generated to a specific location.
I suppose this is not difficult, but since I'm new to Java, I wonder if anybody can help.
BTW, directly using xslt is OK, too.
Thanks in advance.