Create Repeating Section Content Control in Word Document Programmatically

@omri.suissa,
Thanks for your inquiry. I am afraid, there is no further news about this issue. Unfortunately, we cannot provide you any reliable estimate at the moment. We will inform you via this thread as soon as this issue (WORDSNET-12655) is resolved. We apologize for any inconvenience.
If this issue is important to you, and for the fast resolution of this issue, please have a look at paid support options - e.g. purchasing Priority Support will allow you to post your issues in our Paid Support Helpdesk and raise the priority of this issue directly with our product teams, if possible, we will then aim to get a resolution to your issue as soon as we can. Many Priority Support customers find that this leads to their issue being fixed in the next release of the software.

I’m not sure you realize how many bad reviews and bad recommendations you are getting for this approach of not fixing bugs until some pay premium support. We already purchase 2 products from your competitors (redgate) because of this approach…

@omri.suissa,
We are in coordination with our product team to get answer pertaining to your queries. Soon you will be updated with the required information.

@omri.suissa,
It is to inform you that we discussed the matter with our product team. Unfortunately, we cannot promise issue resolution date. It is not going to be implemented anytime soon.
There are many other important issues ahead of this ‘new feature request’ in the queue. Our product team is currently busy in implementing those important issues first. Since this feature is less demanding (only a few customers have requested it so far) and has ‘Normal’ priority, our product team would not be able to push it into production right now. We will notify you via this thread as soon as this feature is implemented or any new information is available. We apologize for your inconvenience.

It is now our time to renew our aspose subscription and we are also looking for other alternatives.
The main reasons that we are seeking alternatives is because of this 3-year-old issue that did not resolved yet.
Before we go to another direction I wanted to know if there is a release date for this issue? Or we still in the dark?

@omri-1,
If this issue (WORDSNET-12655) is important to you, and for the fast resolution of this issue, please have a look at the paid support options - e.g. purchasing ‘Paid Support’ will allow you to post your issues in our Paid Support Helpdesk and raise the priority of this issue. Many ‘Paid Support’ customers find that this leads to their issues being fixed in the next release of the software.
If you would like to take advantage of the ‘Paid Support’ then please request a quote in our purchase forum - https://forum.aspose.com/c/purchase/6
We apologize for your inconvenience and thank you for your understanding.

If we pay paid support you will fix this issue?

@omri-1,
Yes, we will prioritize the development of this ‘New Feature’ (WORDSNET-12655: Programmatically create RepeatingSection SDT using Aspose.Words) and should roughly be able to finish it in the next two releases.

@awais.hafeez
Can you please move this issue to the business support ticketing system?

@omri-1,
Please post your request in Paid Support Helpdesk to be able to raise the priorities of your issuses.

The issues you have found earlier (filed as WORDSNET-12655) have been fixed in this Aspose.Words for .NET 19.9 update and this Aspose.Words for Java 19.9 update.

@omri-1,
Regarding WORDSNET-12655, it is now possible to create ‘structured document tag’ nodes of the repeating section and repeating section item types. The new item has also been added into the SdtType enumeration type. Below is a simple example that creates a table repeating section mapped to a custom XML part:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

CustomXmlPart xmlPart = doc.CustomXmlParts.Add("Books",
"<books><book><title>Everyday Italian</title><author>Giada De Laurentiis</author></book>" +
"<book><title>Harry Potter</title><author>J K. Rowling</author></book>" +
"<book><title>Learning XML</title><author>Erik T. Ray</author></book></books>");

Table table = builder.StartTable();

builder.InsertCell();
builder.Write("Title");

builder.InsertCell();
builder.Write("Author");

builder.EndRow();
builder.EndTable();

StructuredDocumentTag repeatingSectionSdt =
new StructuredDocumentTag(doc, SdtType.RepeatingSection, MarkupLevel.Row);
repeatingSectionSdt.XmlMapping.SetMapping(xmlPart, "/books[1]/book", "");
table.AppendChild(repeatingSectionSdt);

StructuredDocumentTag repeatingSectionItemSdt =
new StructuredDocumentTag(doc, SdtType.RepeatingSectionItem, MarkupLevel.Row);
repeatingSectionSdt.AppendChild(repeatingSectionItemSdt);

Row row = new Row(doc);
repeatingSectionItemSdt.AppendChild(row);

StructuredDocumentTag titleSdt =
new StructuredDocumentTag(doc, SdtType.PlainText, MarkupLevel.Cell);
titleSdt.XmlMapping.SetMapping(xmlPart, "/books[1]/book[1]/title[1]", "");
row.AppendChild(titleSdt);

StructuredDocumentTag authorSdt =
new StructuredDocumentTag(doc, SdtType.PlainText, MarkupLevel.Cell);
authorSdt.XmlMapping.SetMapping(xmlPart, "/books[1]/book[1]/author[1]", "");
row.AppendChild(authorSdt);

doc.Save("E:\\temp\\19.9.docx");

Hope, this helps.

As discussed on paid support - there are still bugs in this solution…

@omri-1,
Can you please copy the discussion points from paid support help-desk and paste here for our reference? Also, please provide complete details of your problem. This will help us to understand your current problem, and we will be in a better position to address your concerns accordingly. Thanks for your cooperation.

1 - StructuredDocumentTag with content dose not duplicate:
When we use the repeating section and the StructuredDocumentTag contains a title – it works. When we the repeating section and the StructuredDocumentTag contains content – the content does not duplicate.
StructuredDocumentTag with title:

var structuredDocumentTagParent = new StructuredDocumentTag(doc, SdtType.RichText, MarkupLevel.Block);
structuredDocumentTagParent.Tag = "tag";
structuredDocumentTagParent.Title = "some text";
structuredDocumentTagParent.LockContentControl = true;
structuredDocumentTagParent.IsShowingPlaceholderText = false;
structuredDocumentTagParent.RemoveAllChildren();
StructuredDocumentTag with content:
var headerParagraphContainer = new Paragraph(doc);
headerParagraphContainer.ParagraphFormat.StyleName = "Heading 2";
var headerParagraphContainerTextContainer = new Run(doc);
headerParagraphContainerTextContainer.Text = "some text";
headerParagraphContainer.AppendChild(headerParagraphContainerTextContainer);
var structuredDocumentTagParent = new StructuredDocumentTag(doc, SdtType.RichText, MarkupLevel.Block);
structuredDocumentTagParent.Tag = "tag";
structuredDocumentTagParent.LockContentControl = true;
structuredDocumentTagParent.IsShowingPlaceholderText = false;
structuredDocumentTagParent.LockContents = true;
structuredDocumentTagParent.RemoveAllChildren();
structuredDocumentTagParent.AppendChild(headerParagraphContainer);

We are using StructuredDocumentTag with content to set the style of the content and to make it “read-only”.
2 – StructuredDocumentTag Bidi dose not duplicate
When duplicating (using the repeat section) a StructuredDocumentTag is dose not kept right to left

@omri-1,
First, please check the code form my previous post to be able to create RepeatingSection structured document tags.
Secondly, please provide two simplified console applications (source code without compilation errors) that help us to reproduce the two problems on our end. Please also provide input documents for these two cases, Aspose.Words generated output documents showing the undesired behaviors and your expected documents here for our reference. Please create expected documents by using MS Word. We will then investigate the issues further on our end and provide you more information. Thanks for your cooperation.