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
In general sxd-document is pretty good at round-tripping XML, at least semantically, but I've noticed that if it loads a document that has multiple xmlns:* attributes in the root, it only retains ones that are actually used in the document.
For the most part, this is ok, since the data is unnecessary and the XML parses fine without the extra namespaces. However, Microsoft Word, for reasons known only to Microsoft, will choke if a docx file is missing some namespaces, even if they aren't used.
The styles, document, for instance, starts like this:
When that resulting file is zipped back up into a docx, Word won't load it without complaining. (It actually is ok, but it throws an error and loads it in Compatibility Mode, prompting the user to oversave the old one.)
Is there any easy way to retain the namespace listing that was present on initial load?
The text was updated successfully, but these errors were encountered:
In general sxd-document is pretty good at round-tripping XML, at least semantically, but I've noticed that if it loads a document that has multiple
xmlns:*
attributes in the root, it only retains ones that are actually used in the document.For the most part, this is ok, since the data is unnecessary and the XML parses fine without the extra namespaces. However, Microsoft Word, for reasons known only to Microsoft, will choke if a docx file is missing some namespaces, even if they aren't used.
The styles, document, for instance, starts like this:
Only two of those xmlns attributes get used in the document, and so they're the only ones present if I write it out again.
When that resulting file is zipped back up into a docx, Word won't load it without complaining. (It actually is ok, but it throws an error and loads it in Compatibility Mode, prompting the user to oversave the old one.)
Is there any easy way to retain the namespace listing that was present on initial load?
The text was updated successfully, but these errors were encountered: