Closed ghost closed 8 years ago
Actually the problem applies only to marked spans with custom types, as is the case in the attached file. See http://docs.oasis-open.org/xliff/xliff-core/v2.0/xliff-core-v2.0.html#annotations.
Looks like the fix is simple, the conditions in methods IOutputResolver.IsOutputRequired()
of classes MarkedSpan
and MarkedSpanStart
should be changed to the following:
if (property == AttributeNames.Translate) { return this.Type == MarkedSpanTypes.Generic; }
Created a pull request with the fix: https://github.com/Microsoft/XLIFF2-Object-Model/pull/14.
Merged pull request #14. Thanks for the contribution!
Thanks as well!
When an XLIFF 2.0 file contains a
<mrk>
tag without the "translate" attribute, the validator sees it as invalid, throwing the error: "System.FormatException: A value for translate must be specified".According the official specification, the translate attribute is optional in
<mrk>
, so the attached file should be valid. It also passes validation by http://okapi-lynx.appspot.com/validation.This only started happening after the last commit, it wasn't an issue before that.
markedSpan.xlf.txt