You were asking on freenode:
<hsnyc> Hey guys, I have a question about supporting Xliff type of files.
> Inside XliffCommon.java file, the function getContentElementList() defines
> several element that are not eligible to use in Xliff type of file. In
> XliffReader.java file, get ElementValue() function, it throws errors if
> legalElements.contains(localName). I want to ask why do you guys choose to
> exclude these tags and what if the input sdlxlf file contains one of these
> <hsnyc> Thanks a lot in advance! Much appreciate if you can email your
> thoughts to my email haiwei...@motaword.com.
The existing XLIFF support in Zanata is very old and unfortunately only
supports one particular subset of XLIFF (very flat XLIFF, almost like
properties files), not general XLIFF support at all. That's why we don't
tend to mention XLIFF support, eg on the zanata.org home page.
I think the code you found in XliffReader just tries to give a better error
message, depending on whether the elements are legal or illegal in XLIFF.
XliffReader was not written to handle these nested elements, even where
they are legal.
If someone were to implement proper support for XLIFF, it would be better
to make a new OkapiFilterAdapter for XLIFF, which should be able to handle
hierarchical XLIFF much better than the old approach ever could.
In terms of complexity, TSAdapter is probably closest to what an
XLIFFAdapter would need to cover.
If you have any more questions, please join and ask on the zanata-devel
mailing list (CCed): http://zanata.org/mailing-lists/
Principal Software Engineer
Globalisation Tools Engineering
zanata-devel mailing list