<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>problem transforming xsl to word (word 2010 - xslt - infopath)</title><link>https://www.infopathdev.com:443/forums/thread/61680.aspx</link><pubDate>Thu, 25 Nov 2010 15:20:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61680</guid><dc:creator>tedescomicchi</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61680.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=61680</wfw:commentRss><description>&lt;p&gt;hi&lt;/p&gt;
&lt;p&gt;based on an article (&lt;a href="http://www.bizsupportonline.net/infopath2007/convert-infopath-form-into-word-2007-document-xslt-c-sharp.htm"&gt;http://www.bizsupportonline.net/infopath2007/convert-infopath-form-into-word-2007-document-xslt-c-sharp.htm&lt;/a&gt;) I have done following:&lt;br /&gt;1. extract the document.xml of a &amp;quot;formatted template&amp;quot; word file &lt;br /&gt;2. renamed it to *.xslt &lt;br /&gt;3. edited this file to get a valid stylesheet &lt;br /&gt;4. created a new infopath form &lt;br /&gt;5. added the xslt file to the data sources of the form &lt;br /&gt;6. added custom code to a click event&lt;/p&gt;
&lt;p&gt;the custom code: &lt;br /&gt;1. duplicates the word template &lt;br /&gt;2. loads the document.xml of the new file as a packagepart &lt;br /&gt;3. uses xslcompiledtransform.transformation and streamwriter to load data into the new document.xml&lt;/p&gt;
&lt;p&gt;one problem that I have is the final content (xml structure) of this file. after the last closing tag there is always a part of the file that is &amp;quot;repeated&amp;quot;. e.g. &amp;quot;&amp;lt;/document&amp;gt;ument&amp;gt;&amp;quot;&lt;br /&gt;if I manually &amp;quot;fix&amp;quot; it, the transformation works fine.&lt;/p&gt;
&lt;p&gt;do you know, if I have done a mistake or is there a known &amp;quot;bug&amp;quot; in the transformation method?&lt;br /&gt;has anybody experience with xslt transformation?&lt;/p&gt;
&lt;p&gt;thank you&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>