computerline1z / okapi

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

Missing ITS namespace declaration after LanguageToolStep (XLIFFWriter) #430

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Summary:

I'm getting back after a while on this, as I noticed something odd about the 
file that is generated as output of the pipeline:
[RawDocumentToFilterEventsStep > LanguageToolStep > 
FilterEventsToRawDocumentStep].
The output file (sample attached) uses the its xml namespace prefix in the 
first source element, before it is declared, thus resulting in an invalid xml 
file.

See https://groups.google.com/forum/#!topic/okapi-devel/7kmXpORF0ZI for the 
original email.

Original issue reported on code.google.com by yves.sav...@gmail.com on 5 Jan 2015 at 5:20

Attachments:

GoogleCodeExporter commented 9 years ago
I believe we encountered this issue in Ocelot and worked around it in 1.0, but 
then later had to change the fix because our first attempt was causing 
problems.  I thought I'd gone back and filed this against XLIFFWriter, but 
apparently I forgot.  Sorry!

Here's the relevant Ocelot bug (which actually describes the regression caused 
by our original attempt to workaround this bug): 
https://ocelot.atlassian.net/browse/OC-21

Original comment by tingley on 6 Jan 2015 at 5:08

GoogleCodeExporter commented 9 years ago
One note: The example file is an XLIFF 1.0 file.
Technically the filter supports 1.2, not versions below. Version 1.0 files 
especially tend to have no namespace declaration at all and would require 
additional workaround.
I'll try to fix the problem focusing on 1.2 documents.

Original comment by yves.sav...@gmail.com on 9 Jan 2015 at 12:02

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 53ad35e985c2.

Original comment by yves.sav...@gmail.com on 9 Jan 2015 at 4:20

GoogleCodeExporter commented 9 years ago
Limitation in the fix: you'll get duplicated version declaration if the ITS 
namespace is declared using a prefix different from 'its'.
It should be a very rare case.

Original comment by yves.sav...@gmail.com on 9 Jan 2015 at 4:22