Closed lziman closed 8 years ago
We cannot reproduce this issue. Can you please provide the snippet of code you are using to serialize the document?
Creating a default MarkedSpan element which has the type="generic" and adding it to a MarkedSpan element with type="comment" will change the type of the added MarkedSpan from generic to comment.
var markedSpanComment = new MarkedSpan("mrk1")
{
Type = MarkedSpanTypes.Comment,
Value = "marked span comment"
};
var markedSpan = new MarkedSpan("mrk2");
markedSpanComment.Text.Add(markedSpan);
And this also happens when deserializing a document, see attached file. Validator throws an exception because the MarkedSpan with id="m3" does not have Reference or Value set but the file is valid and the MarkedSpan is a valid generic MarkedSpan.
Because the ".xlf" file extension is not supported when uploading a document, I changed it to ".txt"
https://github.com/Microsoft/XLIFF2-Object-Model/files/111844/defaultMarkerInsideCommentMarke
Thank you for the additional information. We'll take a look and get back to you.
We have reproduced the issue and are preparing a fix. Thanks.
We have released this fix. Thanks for reporting it!
Adding a marked span element with default type (generic) into a marked span element with type="comment" will change the type from generic to comment:
Expected result:
Actual result: ult:
When serializing the document, the library will throw an error because the marked span element transfomed into comment does not contain "value" or "ref" attribute.
If we add a marked span with default type or "generic" inside a marked span element with type="comment" it shouldn't change the type from "generic" to "comment".