DITA Roundtrip with XLIFF+ITS 2.0
This page describes my first experiments with the DITA-XLIFF Roundtrip for OT and Ocelot. My experiment was to convert from DITA to XLIFF, use Ocelot to add ITS 2.0 metadata and then convert back to DITA. Eventually I would like to see if I can transfer some of the metadata to the DITA documents but I currently do not know enough about DITA to do that.
My thanks to Felix Sasaki and Patrick Tinley for their help with this.
- Download and install version 1.6 of the DITA Open Toolkit. I chose this version as it is the version which the DITA-XLIFF Roundtrip for OT supports.
- Download and install the DITA-XLIFF Roundtrip for OT.
- Copy its20.xsd and its20-types.xsd to the DITA-OT1.6\plugins\ditafromxliff\in\ folder. NOTE: do not use the schema files referred to in Appendix D of the Recommendation document.
- Edit DITA-OT1.6\plugins\ditafromxliff\xsl\x2d.xsl. Add the following line just below the first
- Edit the translated XML file to include a declaration for the ITS schema in the XLIFF root element:
<xliff version="1.2"... its20.xsd xmlns:its="http://www.w3.org/2005/11/its">
- Follow the "DITA to XLIFF sample" and "XLIFF to DITA sample" sections of the DITA-XLIFF_readme.txt file.
So the workflow I was experimenting with was:
- Convert DITA to XLIFF
- Edit with Ocelot and add metadata
- Convert from XLIFF to DITA
You loose the ITS 2.0 metadata in this workflow but as I point out, this is because I do not know enough about DITA to transfer the metadata. Also, within VistaTEC we have other ways of harvesting the metadata so it's not a critical issue for us right now.