<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>Transforming Flat OPC Format to Open XML Documents</title><link>http://blogs.msdn.com/ericwhite/archive/2008/09/29/transforming-flat-opc-format-to-open-xml-documents.aspx</link><description>[Blog Map] Transforming Open XML documents using XSLT is an interesting scenario, but before we can do so, we need to convert the Open XML document into the Flat OPC format. We then perform the XSLT transform, producing a new file in the Flat OPC format,</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Oliver Bell&amp;#8217;s Weblog  &amp;raquo; Blog Archive   &amp;raquo; Eric White has too much to say!</title><link>http://blogs.msdn.com/ericwhite/archive/2008/09/29/transforming-flat-opc-format-to-open-xml-documents.aspx#9014281</link><pubDate>Fri, 24 Oct 2008 09:41:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9014281</guid><dc:creator>Oliver Bell&amp;#8217;s Weblog  &amp;raquo; Blog Archive   &amp;raquo; Eric White has too much to say!</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://osrin.net/2008/10/eric-white-has-too-much-to-say/"&gt;http://osrin.net/2008/10/eric-white-has-too-much-to-say/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Transforming Flat OPC Format to Open XML Documents</title><link>http://blogs.msdn.com/ericwhite/archive/2008/09/29/transforming-flat-opc-format-to-open-xml-documents.aspx#9175561</link><pubDate>Thu, 04 Dec 2008 18:52:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9175561</guid><dc:creator>Alberic</dc:creator><description>&lt;p&gt;Hello, &lt;/p&gt;
&lt;p&gt;Thanks for this great posts about Flat OPC. Very helpfull.&lt;/p&gt;
&lt;p&gt;I have a problem with the flatToOpc method, maybe it is my fault, &lt;/p&gt;
&lt;p&gt;I extracted the an CustomXML Node from a word document using the XMLNode.WordOpenXML function in interop. This make me flap OPC structure (w:pkg..)&lt;/p&gt;
&lt;p&gt;Then i save it to my database. What i m trying to do is to transform this content as a document using the FlatToOpc method. But when i m trying to open the docx build by the function, i doesnt open.&lt;/p&gt;
&lt;p&gt;I look inside the Package and i saw that the package is not complet. I guess it is because the pkg i have is just a fragment of my document.&lt;/p&gt;
&lt;p&gt;Is there a way to transform it as a document? what is the best way?&lt;/p&gt;
&lt;p&gt;Hope you can help me. Thanks in advance.&lt;/p&gt;
</description></item><item><title>re: Transforming Flat OPC Format to Open XML Documents</title><link>http://blogs.msdn.com/ericwhite/archive/2008/09/29/transforming-flat-opc-format-to-open-xml-documents.aspx#9176126</link><pubDate>Thu, 04 Dec 2008 21:51:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9176126</guid><dc:creator>EricWhite</dc:creator><description>&lt;p&gt;Hi Alberic,&lt;/p&gt;
&lt;p&gt;I'm not an expert in Office interop. &amp;nbsp;I believe that when you get your custom XML node, you are only getting the custom XML part, not the complete document.&lt;/p&gt;
&lt;p&gt;However, I believe that you can using interop to 'Save as XML', which is the Flat OPC format (perhaps with a GUID as a filename). &amp;nbsp;You can then load that document and save it to your database. &amp;nbsp;I don't know of any way to get the complete Flat OPC document using Word interop (not to say that there isn't a way - I just don't know it).&lt;/p&gt;
&lt;p&gt;Be aware that if you are saving documents into your database as Flat OPC, your storage requirements (particularly for documents with images) will increase.&lt;/p&gt;
&lt;p&gt;Does this help?&lt;/p&gt;
&lt;p&gt;-Eric&lt;/p&gt;
</description></item><item><title>re: Transforming Flat OPC Format to Open XML Documents</title><link>http://blogs.msdn.com/ericwhite/archive/2008/09/29/transforming-flat-opc-format-to-open-xml-documents.aspx#9179232</link><pubDate>Fri, 05 Dec 2008 11:28:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9179232</guid><dc:creator>Alberic</dc:creator><description>&lt;p&gt;Thanks for this quick answer Eric!&lt;/p&gt;
&lt;p&gt;Actually it is working. My test wasn't working because in my fragment i had a contentcontrol that was databind to an xmlpart that wasn't present in my Flat XML. &lt;/p&gt;
&lt;p&gt;Thanks for the help and all your helpfull posts.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Alb&amp;#233;ric&lt;/p&gt;
</description></item><item><title>re: Transforming Flat OPC Format to Open XML Documents</title><link>http://blogs.msdn.com/ericwhite/archive/2008/09/29/transforming-flat-opc-format-to-open-xml-documents.aspx#9907582</link><pubDate>Thu, 15 Oct 2009 09:51:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9907582</guid><dc:creator>Amy Kins</dc:creator><description>&lt;p&gt;Hi Eric,&lt;/p&gt;
&lt;p&gt;Just wanted to say great post. I have been trying to find an example like this for 2 days straight. We also use word interop to save our documents. Alberic - you can use &amp;quot;Microsoft.Interop.Word._Document.WordOpenXML&amp;quot; to get the documents xml but it seems that this property does not comply with your package standards Eric. If I cannot find a way around this I will simply convert all the document xml content to conform to your flattening standards.&lt;/p&gt;
&lt;p&gt;One thing that does concern me though is that my original document is 372 kb and after flatting it and then packaging it again it is now 505 kb. Could you explain why this happens?&lt;/p&gt;
&lt;p&gt;Thanks again,&lt;/p&gt;
&lt;p&gt;Amykins&lt;/p&gt;
</description></item><item><title>re: Transforming Flat OPC Format to Open XML Documents</title><link>http://blogs.msdn.com/ericwhite/archive/2008/09/29/transforming-flat-opc-format-to-open-xml-documents.aspx#9907591</link><pubDate>Thu, 15 Oct 2009 10:10:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9907591</guid><dc:creator>EricWhite</dc:creator><description>&lt;P&gt;Hi Amy,&lt;/P&gt;
&lt;P&gt;Glad you like the post. &amp;nbsp;Regarding file sizes, I suspect it might have to do with differences in compression methods that my code uses and that Word uses. &amp;nbsp;I didn't do much research around this. &amp;nbsp;There may be other options than CompressionOption.SuperFast which will result in smaller file sizes, but I'm not sure. &amp;nbsp;There may be other factors that impact file size. &amp;nbsp;Currently, I'm deeply involved in another project that I must finish in the next couple of weeks.&amp;nbsp;&amp;nbsp;I'll take a look at this as soon as I'm able.&lt;/P&gt;
&lt;P&gt;-Eric&lt;/P&gt;</description></item></channel></rss>