29 ms·
My intuition is that an XSLT that can handle everything in a .docx document has approximately the same complexity as the Word executable because it must correct
by brudgers 10y ago
My intuition is that an XSLT that can handle everything in a .docx document has approximately the same complexity as the Word executable because it must correctly interpret the information in the .docx in order to correctly transform it. Which is to say that the number of corner cases that such an XSLT has to handle is very very large. It is a reflection of the many many developer-years that has gone into the project.
Because a .docx is already a set of XML documents, and Microsoft provides tools for manipulating them [1], my gut reaction would be to treat Microsoft's format as the primary form of storage and use those tools rather than something custom built for a different XML format: it avoids having to design and build the software for translating .docx files, designing a custom XML schema, and building tooling for that custom schema.
If conversion is definitely necessary, I'd still think performing it with Microsoft's tooling is likely to be more productive than hand coding XSLT.
Good luck.
[1]: https://msdn.microsoft.com/en-us/library/office/dn467914.aspx https://msdn.microsoft.com/en-us/library/office/dn467914.asp...