- changed status to resolved
ID of groups don't use input id in XLIFF Filter
Original [issue 185](https://code.google.com/p/okapi/issues/detail?id=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
Comments (2)
-
Account Deleted -
Account Deleted Comment [2.](https://code.google.com/p/okapi/issues/detail?id=185#c2) originally posted by @ysavourel on 2011-09-18T21:17:52.000Z:
This issue was closed by revision r6224.
- Log in to comment
Comment [1.](https://code.google.com/p/okapi/issues/detail?id=185#c1) originally posted by @ysavourel on 2011-09-18T21:01:23.000Z:
This should be fixed for M14. The id is now re-using the one from the XLIFF input document when available. Otherwise it creates one, and make sure it was not used already.