ID of groups don't use input id in XLIFF Filter

Created by: Anonymous

Original issue 185 created by @ysavourel on 2011-09-08T17:58:18.000Z:

Hello all,
In my of my uses of the XLIFFFilter I have discovered that the ID of the
groups (that I get in the START_GROUP event) is always generated, overriding
what is in the file.
Tracking it down, it looks like the cause is this line in XLIFFFilter.java
(trunk\okapi\filters\xliff\src\main\java\net\sf\okapi\filters\xliff\XLIFFFi lter.java
)
StartGroup group = new StartGroup(parentIds.peek().toString(),
groupId.createId());
My fix is this (added after the line above):
tmp = reader.getAttributeValue(null, "id");
if ( tmp != null )
group.setId(tmp);
Hope it helps.
Checking the xliff spec it also looks like the id is not mandatory for
groups, so maybe we should just create the group without an id.
But that this does not seem so problematic as some generated thing
overriding the real value :-)
Thank you,
Mihai

Assignee Loading
Time tracking Loading