XLIFF Splitting and Merging

Issue #146 resolved
Former user created an issue

Original [issue 146](https://code.google.com/p/okapi/issues/detail?id=146) created by micah... on 2010-10-14T21:07:43.000Z:

What steps will reproduce the problem? 1. This functionality was present (buggy) in .net OKAPI, not yet present in Java Okapi (?) 2. 3.

What is the expected output? What do you see instead? Under .net version of Okapi (latest version), you could split a single xliff into multiple xliffs, based on the <file> element. Each component xliff written out had all the header information, and then one file element. The problem was that it added line returns to the source and target: whenever there was an inline element directly following <source> or <target>, it added a line return. If <source> or <target> was followed first by a text string, it didn't do this. Same for inline elements directly before the closing </source> or </target>. This behavior made it destructive to use the tool.

Example of it after split: <source> <ph id="1" x="&lt;Emphasis Style=&quot;Bold&quot;&gt;">{1}</ph>Caution:<ph id="2" x="&lt;/Emphasis&gt;">{2}</ph> To prevent catheter damage or dislodgement during introducer needle and guide wire removal:</source>

Same data, before split: <source><ph id="1" x="&lt;Emphasis Style=&quot;Bold&quot;&gt;">{1}</ph>Caution:<ph id="2" x="&lt;/Emphasis&gt;">{2}</ph> To prevent catheter damage or dislodgement during introducer needle and guide wire removal:</source>

What version of the product are you using? On what operating system? winXP, final .net version. Tested Java version on OS X 10.6, but it doesn't seem to have that utility built in yet.

Please provide any additional information below. Split/merge can be really useful, I hope it gets added back soon (with tweak for the white space handling)!

Comments (5)

  1. Former user Account Deleted

    Comment [1.](https://code.google.com/p/okapi/issues/detail?id=146#c1) originally posted by @ysavourel on 2010-10-14T21:44:44.000Z:

    Correct: we have only a XLIFF Splitter step currently. We'll add the merge/split functionalities in the TODO list. No idea of the deadline, but it should not be too difficult, so it has a chance to get done. (with attention paid to the space/line handling)

  2. Former user Account Deleted

    Comment [3.](https://code.google.com/p/okapi/issues/detail?id=146#c3) originally posted by micah... on 2010-10-19T15:59:15.000Z:

    I wasn't aware the XLIFF Splitter was in the new system, the change to the pipeline tool confused me. I see it there now, and it seems to work ok on OS X (no more extra whitespace), but we're getting heap errors on windows XP machines if there are 3+ <file> elements in the XLIFF. Works ok if only 2 <file> elements. I'll file a separate bug report for that.

  3. Log in to comment