Presentation on theme: "Don asked me to run some samples through xliffRoundTrip tool Grabbed the DITA Open Toolkit samples (DITA-OT1.2.2_bin.zip) from"— Presentation transcript:
Don asked me to run some samples through xliffRoundTrip tool Grabbed the DITA Open Toolkit samples (DITA-OT1.2.2_bin.zip) from http://dita-ot.sourceforge.net Ran them through the xliffRoundTrip tool http://sourceforge.net/projects/xliffroundtrip/
Started with one of Dons samples Garage Concepts A well-stocked garage can be the envy of the neighborhood.
Got a translated DITA file Garage-Konzepte Eine gut-auf Lagere Garage kann der Neid der Nachbarschaft sein.
Problem: lots of DITA files can be tedious to process, 1 by 1
Created a little command-line application; goes like this: Started with xliffRoundTrip Tools XSLTs Noted that the sample has a map file (hierarchy.ditamap) (being shamefully inexperienced with DITA)... I made a naive assumption that many DITA documents have some kind of map file Modified the XSLT to read the mapfile, and convert each of the referenced files to XLIFF
Unzip the zip file; get this Note: to output many-from-one, XSLT 2.0 was necessary. I included Saxon-B 8.7.1, which is officially hosted here: http://saxon.sourceforge.net/#F8.7.1SA
Double click step1_D2X.bat step1_D2X.bat interrogates the samples\hierarchy.ditamap Generates an XLIFF file (xliff_ized_DITA.xlf) which has elements for each file referenced in the hierarchy.ditamap
Double click step2_pseudo-xlate.bat For demonstration purposes, hit the XLIFF file with a little pseudo translation XSLT step2_pseudo-xlate.bat translates the elements in the xliff_ized_DITA.xlf XLIFF file, to create p_xlated_xliff_ized_DITA.xlf
Double click step3_X2D.bat step3_X2D.bat transforms the translated XLIFF file (p_xlated_xliff_ized_DITA.xlf) to translated DITA files It creates subdirectories for the translated files, and puts the DITA files in the appropriate subdirectory