I have an xml file generated dynamically using the Open XML SDK which dispays some metadata about a docx file. Is it possible to use xslt to add style sheets to this dynamically generated xml file us开发者_Go百科ing the Open XML SDK?
Open XML is supposed to be used with Word, Excel or PowerPoint documents. Each one of these have a specific section for styles where you specify how certain elements will look throughout the document. If you know how the XML will look in these style sections then you could load up the style.xml and use xslt to add styles, but you wouldn't do that with the Open XML SDK, but with basic C# code that would read and transform XML. I would recommend just using the Open XML SDK to add the styles dynamically since it should take away from some of the complexity of having to know the style.xml schema.
精彩评论