You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.
i am posting here the issue I posted on Eric's forum, so that maybe someone else had that problem.
When opening a Word document that was created on versions 2013 and 2016, using the MarkupSimplifier.SimplifyMarkup method with NormalizeXml marked as true,saving it as-is and finally opening it on Word itself will cause the following error to be shown:
The XML data is invalid according to the schema
Location: Part: /word/styles.xml, Line: 0, Column: 0
That impede the document to be normally opened via interop, unless the OpenAndRepair parameter is set to true, however it is not desirable to use that approach.
Digging on the styles.xml file on both the origin document and "corrupt" processed document,
there's additional attributes in the first elements of the respective documents:
Everything below those tags doesn't seem to be much different, mainly the order of the attributes is changed, but I don't believe this would cause the error. A complete test WinMerge HTML report can be found here, use the google drive viewer or download it and open in a browser.
Below are the files/project to test it. Drag and drop any docx file on the executable and it will generate a {FILENAME}_processed file. Open it to test if the format is correct.
I added the missing tags from the newer versions of Word to the list on each namespace attribute list that i located. Please review it and check if there's nothing wrong if this change.
Same issue as here #48 @ManoShu Thanks for submitting the fix, it looks more complete than the temporary workaround I used when dealing with this issue. Hopefully it gets merged soon and I won't have to keep using my custom build.
Closing all issues as this repo is being archived and will no longer be maintained by Microsoft. The project is licensed for continued use and development by forking to your own repo.
Hello,
i am posting here the issue I posted on Eric's forum, so that maybe someone else had that problem.
When opening a Word document that was created on versions 2013 and 2016, using the MarkupSimplifier.SimplifyMarkup method with NormalizeXml marked as true,saving it as-is and finally opening it on Word itself will cause the following error to be shown:
That impede the document to be normally opened via interop, unless the OpenAndRepair parameter is set to true, however it is not desirable to use that approach.
Digging on the styles.xml file on both the origin document and "corrupt" processed document,
there's additional attributes in the first elements of the respective documents:
Original document:
Processed document:
Everything below those tags doesn't seem to be much different, mainly the order of the attributes is changed, but I don't believe this would cause the error. A complete test WinMerge HTML report can be found here, use the google drive viewer or download it and open in a browser.
Below are the files/project to test it. Drag and drop any docx file on the executable and it will generate a {FILENAME}_processed file. Open it to test if the format is correct.
CompiledProject.zip
DocxFiles.zip
DocxTestProject.zip
Thanks in advance.
EDIT: Open-XML-SDK and Open-XML-PowerTools assemblies used were cloned and compiled on 2016-12-06
The text was updated successfully, but these errors were encountered: