Open GoogleCodeExporter opened 9 years ago
CC'ing Kevin. We talked about this a bunch when he was working on the code,
and there are some ugly cases. XLIFF Splitters (which are common) are unlikely
to be ITS-aware, since most of them are extremely simple. This means if we
want to support that use case, we will need to make sure that each <file>
contains all the relevant ITS metadata for its own contents. This is a
disconnect from the way ITS standoff can be referenced by multiple locations in
the file. To fully support XLIFF splitting, it is therefore sometimes
necessary to rewrite existing ITS standoff so that there is one copy for each
referencing location. (And then moving that standoff inside the relevant
<file>.)
When we were initially working on it, we didn't want to touch any of that
stuff, so we went the simple route at the risk of breaking the XLIFF splitter.
But it looks like you're right about the schema; we would need to move it to be
before the first <file>, at least.
Original comment by tingley
on 22 Aug 2013 at 5:27
The reason why the ITS entries were placed at the end of the file was the list
of ITS standoff to be written out is built during the processing of the
document by the XLIFFSkeletonWriter. So the standoff isn't known until the end
of the document, which must be since we need to resolve the ITS references on
the elements in the XLIFF file and detect any duplicate references in the
standoff.
We may need to parse the document twice and pass in the ITS standoff to be
written in the processStartDocument method. I'm worried this would enforce
unusual usage behavior for the XLIFFSkeletonWriter, but I guess it would be
only for handling ITS metadata.
Original comment by ke...@spartansoftwareinc.com
on 22 Aug 2013 at 7:05
Maybe that is not worth the trouble.
The issue occurs only because the schema doesn't match the spec. So it's only
when one want to validate the XLIFF document.
I'll put this has a low-priority issue.
Original comment by yves.sav...@gmail.com
on 22 Aug 2013 at 7:21
See also Issue 396 - doing it per-file is not valid XLIFF.
Original comment by tingley
on 7 Apr 2014 at 11:58
Original issue reported on code.google.com by
yves.sav...@gmail.com
on 22 Aug 2013 at 5:42