'w16sdtdh' is an undeclared prefix


After opening and saving this document to stream with aspose (22.1) we get the following exception when we reopen it: System.Xml.XmlException: ‘w16sdtdh’ is an undeclared prefix.

The scenario is where we used Builder.InsertDocument to insert a document with a content control.
How can I Solve/Repair the namespace ?


var ms = new MemoryStream(Resources.Example);
var document1 = new Document(ms);

var result = new MemoryStream();
document1.Save(result, SaveFormat.Docx);

// System.Xml.XmlException: 'w16sdtdh' is an undeclared prefix.
var document2 = new Document(result);

Example.docx (100.8 KB)

@fhellemond I cannot reproduce the problem with the latest 22.2 version of Aspose.Words. It seems the issue was resolved by WORDSNET-23287 fix.
Please try using the latest 22.2. version of Aspose.Words and let me know if the problem is still there on your side.


I have upgrade the version to (22.2), but we still experience error’s related with this namespace. I Include a Example Project that reproduces the error. After upgrading to the new version there is a different behavior and it looks better, yet now a similar error occurs later in the process.

Could you please explain what the problem is or current limitation without risking these exceptions?

AsposeSampleProject.zip (738.6 KB)

@fhellemond Thank you for additional information. I have managed to reproduce the problem on my side. For a sake of correction it has been logged as WORDSNET-23487. We will keep you informed and let you know once it is resolved.

Thank you, I am looking forward to the fix.

Could you please share any technical information or the titlle/summary how this is logged. If I better understand the problem there might be a temporary work arround for us now.

@fhellemond The issue is logged with the following title:
XmlException: ‘w16sdtdh’ is an undeclared prefix. Is thrown upon opening DOCX produced by Aspose.Words.
The issue is currently in the que for analysis. Once analysis is complete we will be able to provide you more technical information regarding the issue or a workaround.


I see that the issue is closed, is this fixed in the next update ?

@fhellemond Yes, the issue is resolved and the fix will be included into the next 22.3 version of Aspose.Words, which will be published at the beginning of the next month. We will additional notify you once it is available.

that is great news, thank you very much!

The issues you have found earlier (filed as WORDSNET-23487) have been fixed in this Aspose.Words for .NET 22.3 update also available on NuGet.