Introduction · Input for TransPrep · Command line processing and output options · Using TransPrep in a Java application · Further information · (TransPrep.0.1.jar and source code)
This page describes TransPrep, a Java tool for processing ITS 1.0 "Translate" information. Such information can be used to identify translatable and non-translatable parts in XML documents.
For more information on how to use ITS 1.0, see the Best Practices for XML Internationalization document.
To use TransPrep, you need the following:
Optionally, you may use one or more external rules files.
java -jar TransPrep.0.1.jar will show you how
to evoke TransPrep from the command line:
TransPrep v. 0.1 For documentation see http://www.w3.org/2008/05/transprep/ USAGE: inputfile outputfile outputformat [externalRules] outputformat can be one of: 1 = input document decorated with translation information 2 = pseudotranslate 3 = testsuite output
For this sample input document, the output is like this:
More sample input files and sample output are available.
The following is an example of creating (1) a TransPrep object, (2) a document which has a DOM with translation information, and (3) test suite output.
(1) TransPrep tp = new TransPrep("Translate1.xml", "Translate1-output1.xml", 3); (2) Document decoratedDom = tp.decorateDom(); (3) tp.createOutput(decoratedDom, tp.outputDoc);
The following is the same as above, except that it uses a different constructor for the TransPrep object, with the addition of an external rules file.
TransPrep tp = new TransPrep("Translate1.xml", "Translate1-output1.xml", 3, "externalRules.xml"); Document decoratedDom = tp.decorateDom(); tp.createOutput(decoratedDom, tp.outputDoc);
This is work in progress. Any feedback is very welcome, and further information is available from Felix Sasaki. Note also that the ITS Interest Group is discussing a general DOM API for processing ITS information, and that TransPrep is likely to be re-implemented using that API.
Version: $Id: Overview.html ,v 1.6 2007/02/14 16:15:24 fsasaki Exp $