computerline1z / okapi

Automatically exported from code.google.com/p/okapi
0 stars 0 forks source link

XLIFF id incorrectly after rebalancing #406

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The rebalancing of the codes in fragments read from XLIFF file is dangerous, 
because you could get in situation where an orphan opening and an orphan 
closing get matches as they don't have they respective type set properly.

<trans-unit id="tu29" xml:space="preserve">
<source xml:lang="en"><it id="1" pos="open">&lt;li></it>mouse double click 
event <it id="2" pos="close">&lt;/ol></it></source>
</trans-unit>

Gives: two codes matching on id=1 after rebalancing (same type='it' instead of 
'li' and 'ol' in the source).

New design should fix this by a) avoiding rebalancing and b) storing the type 
when available.

Original issue reported on code.google.com by yves.sav...@gmail.com on 23 May 2014 at 10:03