{"id":3260,"date":"2016-03-24T03:23:00","date_gmt":"2016-03-24T03:23:00","guid":{"rendered":"http:\/\/www.ericwhite.com\/home2\/bm8qcmjy\/public_html\/blog\/?p=3260"},"modified":"2016-04-06T00:47:26","modified_gmt":"2016-04-06T00:47:26","slug":"open-xml-powertools-and-javascript","status":"publish","type":"post","link":"https:\/\/www.ericwhite.com\/blog\/2016\/03\/24\/open-xml-powertools-and-javascript\/","title":{"rendered":"Open-Xml-PowerTools and JavaScript"},"content":{"rendered":"<p>One issue that many Open XML developers face when doing Open XML development in JavaScript is the need for many of the important modules available in Open-Xml-PowerTools.<\/p>\n<p>To date, almost none of the Open-Xml-PowerTools have been converted to JavaScript (in a publicly releasable form).<\/p>\n<p>However, I designed the Open-Xml-Sdk for JavaScript with the specific intention to enable manual conversion of Open-Xml-PowerTools code from C# to JavaScript.  The Ltxmljs library is semantically compatible with the .NET LINQ to XML library.  The Open-Xml-Sdk for JavaScript was designed with the idea that the common idioms that we use in the Open-Xml-Sdk can be converted to JavaScript with ease.<\/p>\n<p>Proof-in-the-pudding is that I converted thousands of lines of code (of a preliminary version of the WmlToHtmlConverter) to JavaScript.  This included the FormattingAssembler module, the ListItemRetriever module, the HtmlConverter module, and more.  It worked very nicely.  However, because this was based on a half-baked WmlToHtmlConverter, I decided that I wanted to first polish those modules as written in C#, and then at some future point in time convert the finished modules to JavaScript.  I fully expect to convert these modules to JavaScript (but it is not going to happen in the near future, as my current projects prohibit an effort of this magnitude).<\/p>\n<p>Key points:<\/p>\n<ul>\n<li>It is doable.<\/li>\n<li>It is non-trivial.  You should be expert in C#, HTML, CSS, JavaScript, LINQ to XML, functional programming, and Open XML markup.  I don&#8217;t want to minimize what you must know in order to tackle conversion of one of these modules to JavaScript.\n<\/ul>\n<p>But it is doable.  I have a goal to do this, but it must fit in with other priorities in my life, like keeping my kid and wife with groceries.  \ud83d\ude42<\/p>\n<p>Cheers, Eric<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One issue that many Open XML developers face when doing Open XML development in JavaScript is the need for many of the important modules available in Open-Xml-PowerTools. To date, almost none of the Open-Xml-PowerTools have been converted to JavaScript (in a publicly releasable form). However, I designed the Open-Xml-Sdk for JavaScript with the specific intention [&hellip;]<\/p>\n","protected":false},"author":10567,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_s2mail":"yes","footnotes":""},"categories":[1],"tags":[],"class_list":["post-3260","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/posts\/3260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/users\/10567"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/comments?post=3260"}],"version-history":[{"count":2,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/posts\/3260\/revisions"}],"predecessor-version":[{"id":3321,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/posts\/3260\/revisions\/3321"}],"wp:attachment":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/media?parent=3260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/categories?post=3260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/tags?post=3260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}