DITA and XLIFF DITA and XLIFF
Dec 11, 2015
BackgroundBackground
• I am co chair of the OASIS XLIFF TCI am co chair of the OASIS XLIFF TC• I wrote an open source tool called I wrote an open source tool called
xliffRoundTrip Tool xliffRoundTrip Tool ((http://sourceforge.net/projects/xliffroundtrip/http://sourceforge.net/projects/xliffroundtrip/))
• It works great with document-centric XML It works great with document-centric XML filesfiles
• I wrote the tool without much thought I wrote the tool without much thought about topic-based XML filesabout topic-based XML files
ContinuedContinued
• It eventually became clear to me that I It eventually became clear to me that I would need to write a DITA-specific would need to write a DITA-specific modulemodule
• Here’s the storyHere’s the story
The DITA TC began thinking The DITA TC began thinking about translationabout translation
About the time the DITA Translation About the time the DITA Translation Subcommittee was forming I was asked Subcommittee was forming I was asked if my tool would be a good fit if my tool would be a good fit
I tested the DITA Open Toolkit samples I tested the DITA Open Toolkit samples (DITA-OT1.2.2_bin.zip) with the original (DITA-OT1.2.2_bin.zip) with the original xliffRoundTrip toolxliffRoundTrip tool
Started with the Garage topicStarted with the Garage topic
<!-- (C) Copyright IBM Corporation 2001, 2005. All Rights Reserved.
*-->
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
"../../dtd/concept.dtd">
<concept id="conceptconcept" xml:lang="en-us">
<title>Garage Concepts</title>
<conbody><p>A well-stocked garage can be the envy of the neighborhood.</p></conbody>
</concept>
Created a perfectly valid XLIFF FileCreated a perfectly valid XLIFF File<xliff xmlns="urn:oasis:names:tc:xliff:document:1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmrk="http://www.xmarker.com" version="1.1" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.1
xliff-1.1.xsd"><file original="concept" source-language="en" datatype="plaintext" xmrk:id="conceptconcept"><body><trans-unit xmrk:ancs="1" id="title-x-mch1-N10006" resname="title"><source xmrk:ancs="1">Garage ConceptsGarage Concepts</source><target>Garage ConceptsGarage Concepts</target></trans-unit><group resname="conbody" xmrk:ancs="1" id="throw1-N10008"><trans-unit xmrk:ancs="2" id="p-x-mch1-N10009" resname="p"><source xmrk:ancs="2">A well-stocked garage can be the envy of the A well-stocked garage can be the envy of the
neighborhood.neighborhood.</source><target>A well-stocked garage can be the envy of the neighborhood.A well-stocked garage can be the envy of the neighborhood.</target></trans-unit></group></body></file></xliff>
Did a quick and dirty translationDid a quick and dirty translation<xliff xmlns="urn:oasis:names:tc:xliff:document:1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmrk="http://www.xmarker.com" version="1.1" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.1
xliff-1.1.xsd"><file original="concept" source-language="en" datatype="plaintext" xmrk:id="conceptconcept"><body><trans-unit xmrk:ancs="1" id="title-x-mch1-N10006" resname="title"><source xmrk:ancs="1">Garage ConceptsGarage Concepts</source><target>Garagen-KonzepteGaragen-Konzepte</target></trans-unit><group resname="conbody" xmrk:ancs="1" id="throw1-N10008"><trans-unit xmrk:ancs="2" id="p-x-mch1-N10009" resname="p"><source xmrk:ancs="2">A well-stocked garage can be the envy of the A well-stocked garage can be the envy of the
neighborhood.neighborhood.</source><target>Eine gut-gefüllte Garage kann die Nachbarn neidisch machenEine gut-gefüllte Garage kann die Nachbarn neidisch machen</target></trans-unit></group></body></file></xliff>
Got a translated DITA fileGot a translated DITA file
<?xml version="1.0" encoding="utf-8"?><!-- (C) Copyright IBM Corporation 2001, 2005. All
Rights Reserved. *--><concept id="conceptconcept"><title>Garagen-Konzepte</title><conbody><p>Eine gut-gefüllte Garage kann die
Nachbarn neidisch machen</p></conbody></concept>
Problem: lots of DITA files can Problem: lots of DITA files can be tedious to process, 1 by 1be tedious to process, 1 by 1
Translating can be difficult or Translating can be difficult or translating can be easytranslating can be easy
• The ParadoxThe Paradox– DITA’s strength its ability to harness many topics DITA’s strength its ability to harness many topics
for a variety of outputsfor a variety of outputs– DITA’s difficulty for the LSP is its many filesDITA’s difficulty for the LSP is its many files
• Strategy: Strategy: – Take advantage of DITA’s mapfile in order to Take advantage of DITA’s mapfile in order to
manage the many topic filesmanage the many topic files– Create an XSLT to read the mapfile, and convert Create an XSLT to read the mapfile, and convert
each of the referenced files to a single XLIFF fileeach of the referenced files to a single XLIFF file
DITA/XLIFF RoundtripDITA/XLIFF Roundtrip
Open Source tool Open Source tool DemonstrationDemonstration
Creates new folders with Creates new folders with translated topics and SVG filestranslated topics and SVG files
In the real wordIn the real word
• Use your own DITA projectUse your own DITA project
• Generate the XLIFF fileGenerate the XLIFF file
• Have an LSP translate the XLIFF fileHave an LSP translate the XLIFF file
• Run the Import stepRun the Import step
• Enjoy your translated DITA Topics and Enjoy your translated DITA Topics and SVG filesSVG files