I created an xsl transformation that can transform an xml file to a Word document, I opened the xml document with Microsoft Word, and applied the xslt over the document, and I was very impressed by the results.
The problem is, when I programmatically change the xml document that is in the background, the word document does not update itself; for example, if the xsl is used to generate a table, and I added a new row to the xml, Microsoft Word does not add a new row to the table.
The only way to do that is to apply a new transform on the document again, is it possible to have one xsl transformation always on?
The same like InfoPath, there is an xslt behind, and each time you change something in the xml data, the xslt refreshes the screen.
Are Microsoft Word 2007 and OpenXml the same?
Have you saved the xml file after modifying programmatically?
//Open the xml fileXmlDocument xDoc = new XmlDocument(); xDoc.Load(@"path");
I have simulated the scenario and is working fine.
The xml is saved, and the xslt works, but my problem is the re render of the document.
I created an XML file and saved it.
I opened it with Microsoft Word, and applied the XSLT over it.
I programmatically modified the XML document using the Word object module and Interop (C#).
Once I modify the xml, the Word document is not refreshed; comparing it to Microsoft InfoPath, if I modify the XML in InfoPath for example, the xslt will immediately update the document content.
In Microsoft Word, the only way that I found is to apply a transform against the entire document, and it is manual, not like InfoPath where the XSLT is live.