Append table row with cloned cells of last row with StructuredDocumentTags

I have a table with a row which contains StructuredDocumentTags. I have to add a new row, which I deepClone(true) from the lastRow. The result looks good: a new row. I iterate over the new StructuredDocumentTags and change the title and tag.

In the second step I iterate over all StructuredDocumentTags - for these of MarkupLevel.CELL I removeAllChildren(...) add a Paragraph and a Run with the needed value. In my debug-Log everything works as expected, I see .

BUT! In the Word application, all rows show only the text of the first (i.e. cloned) SDT! If I repeatedly add new rows, the whole table only shows the values from the first row. Why?

If I inspect the cloned StructuredDocumentTag-Controls in Word, they have the changed titles and tags. Which is correct. Only the shown text is wrong!

When I save the document as a PDF, not as a DOCX … it looks correct as expected!?! Only in the word file it’s wrong.

What’s wrong with the cloned StructuredDocumentTags? The IDs of them where distinct, I didn’t see any explanation for this display.

Please help me :slight_smile: Thanks!

@RLehmann Could you please attach your input and output documents here for testing? We will check the issue and provide you more information.
Probably your SDT has an XML mapping and its value is read from XML. Have you tired removing XML mapping?
https://reference.aspose.com/words/java/com.aspose.words/xmlmapping/#delete