Whew! Comments are working again on this blog!

First of all, I apologize for neglecting this blog for so long.  I’ve been super busy doing stuff at OpenXmlDeveloper.org, and after interacting there, haven’t had energy for blogging here.  But I’m turning over a new leaf – have some great non-Open-XML content to post here (as well as some Open XML content).

Also, as many of you have noticed, comments have not been working on this blog.  After learning far more than I wanted to about PHP and MySQL, I finally determined that I had a corrupted comments table in MySQL – I installed phpMyAdmin, and then was able to repair the table, and presto, comments started working again!

I will be working on responding to comments (even old ones) here over the next while.  If you leave new comments, I’ll respond to those first, of course!

Comments (5)

Screen-cast series on writing Recursive Pure Functional Transformations

On OpenXMLDeveloper.org, I am publishing a screen-cast series on writing recursive pure functional transforms, which is a powerful programming technique for transforming document-centric XML (such as Open XML WordprocessingML, XHTML, or ODT) into other forms of XML. I have posted four screen-casts in this series. I anticipate that there will be about 20 screen-casts before all is said and done. You can find the complete list here.

Comments (8)

LINQ to XML for JavaScript – Gaining Perf thru Atomization

LINQ to XML for JavaScript uses the same approach for good perf as LINQ to XML for .NET – atomization. Read more: http://openxmldeveloper.org/home2/bm8qcmjy/public_html/blog/b/openxmldeveloper/archive/2012/10/24/linq-to-xml-for-javascript-gaining-performance-through-atomization.aspx

Comments

LINQ to XML for JavaScript

I’ve been hard at work in my spare time for months now developing a small JavaScript library that enables you to write code in the style of LINQ to XML. I developed this because I needed to implement some interesting functionality in JavaScript, and I already basically had the code written in C#, so writing this library enabled me to translate that C# code to JavaScript with a minimum of fuss and trouble. ltxml.js – LINQ to XML for JavaScript

Comments

Sorting Text in Visual Studio

Sometimes you need to sort some lines of code in Visual Studio – for instance, if you have a long list of Open XML content types, Open XML relationship types, or elements names, you may want that list to be sorted. Here is a little VB snippet (from stackoverflow) that sorts text.

Sub SortLines()
    Dim Selection As TextSelection = DTE.ActiveDocument.Selection
    Dim Lines() As String = Selection.Text.Replace(Environment.NewLine, Chr(13)).Split(Chr(13))
    Array.Sort(Lines)
    DTE.UndoContext.Open("Sort Lines")
    ' Edit - see comments
    ' Selection.Text = String.Join(Environment.NewLine, Lines)
    Selection.Delete()
    Selection.Insert(String.Join(Environment.NewLine, Lines))
    DTE.UndoContext.Close()
End Sub

Posting this here so I can find it again easily.

Comments

Running the SharePoint 2010 IW Demo VM under Windows 8

Here is something that is very cool.  Windows 8 includes Hyper-V, and it is super painless to run the SharePoint 2010 IW Demo VM under Windows 8:

Further, I was able to connect the wireless adapter to the VM, and activate Windows Server 2008 using WIFI. When using this VM under WS2008, it was necessary to physically connect a wire to the computer to do this activation, since there was no way to connect a WIFI adapter so that a VM could connect to the internet.

And, even while the VM is running you can sleep the computer!!!!  How awesome is that! This capability alone makes Windows 8 worth the price of admission.

In a nutshell, here are the steps:

  • Make sure that you have enabled hardware virtualization in your BIOS.
  • Go to Control Panel, then go to Programs and Features
  • Click ‘Turn Windows features on or off’
  • Check the Hyper-V node in the tree control, let it install, and then reboot.
  • Download and unpack the SharePoint 2010 IW Demo VM in the usual way. The remainder of these steps are basically identical to how you setup this VM when using Hyper-V under Windows Server 2008 R2 (with the minor exception that you can use WIFI to activate WS2008 in the VM).
  • Using the Virtual Switch Manager in the Hyper-V Manager, add an internal network adapter (as detailed in Virtual Machine Setup Guide.docx). This guide is available on the same page as the rest of the IW Demo VM. This network should be called ‘Internal’. Set the IP4 address, per the instructions in the Virtual Machine Setup Guide.
  • Import the Virtual Machine.
  • Configure the memory and/or processors as necessary or desired.
  • Boot the VM, and let it stabilize.  It will add drivers and need to reboot. After rebooting, and letting the machine do all of its JITting, you can start IE and see SharePoint 2010 running.
  • Shut down the VM.
  • Using the Virtual Switch Manager in the Hyper-V Manager, add the WIFI network adapter.
  • Edit the settings for the 2010-10a VM, and add the WIFI adapter to the Virtual Machine.
  • Boot the machine. If you have WIFI connectivity, you will be able to browse the web from inside the VM.
  • Click Start -> Right-Click Computer -> Properties. You can activate the VM from this dialog box. You now can use this VM without interruption for 180 days.
  • Shut down the VM. Remove the WIFI adapter from the settings for the VM.
  • Reboot, enjoy

Comments (5)

Repeating Content in Document Generation System that uses XPath Expressions in Content Controls

Update August 26, 2015: I have enhanced this document generation system, and published it as part of Open-Xml-PowerTools, which you can find at https://github.com/OfficeDev/Open-Xml-PowerTools. Going forward, I will be enhancing and maintaining that document generation system. Please feel free to clone / fork that repo, report issues on GitHub, and interact with me there.

I recently received a very good request for an enhancement to this document generation system.  The request was for a “Repeat” control that works in a similar way to tables, but instead of putting child records into a table, the document generation system generates a repeating section of content.

To review, here is what the template document looked like in the last iteration of this document generation system.  Below, you can see a screen-shot of the template document.  Following that screen-shot, there is a listing of the XML file that contains the data that will be used in the document generation process.

  • The green oval in the template document contains the XPath expression that selects the XML elements that contain the data for each of the documents.  That XPath expression selects the Customer elements in the XML document (also circled with a green oval).
  • Then, having selected the records for documents, the XPath expression in the blue oval selects the child records for the rows in the table.  The context nodes for that XPath expression are the Customer elements selected by the XPath expression in the green oval.  The selected elements in the XML document are encircled by a blue rounded rectangle.
  • And then finally, the XPath expressions circled by red select the values to place in the cells in the table.  In the XML document, the first set of nodes selected by those XPath expressions are also circled with a red oval.

Template1

XML1

The Repeat construct is parallel to that of a table. The following template document is similar in structure to the above template document, except that instead of generating a table, it generates repeating content.

Template2

When generated with the above XML document, the first document in the generated document looks as follows. I have encircled the repeating content with green rounded rectangles:

GenDocs1

Of course, due to the recursive implementation, you can get really elaborate with this setup. You can, for instance have repeating content within repeating content, or conditional content that contains a table within repeating content, and so on.

Download: 12-02-21-Gen-Docs-XPath

Comments

Updated Table-of-Content for everything that I’ve written or recorded

Over the last few years, I’ve written a fair number of blog posts, MSDN articles, OpenXMLDeveloper.org blog posts, and blog posts on my blog at EricWhite.com/blog. In addition, I’ve recorded over 60 screen-casts. I’ve assembled links to all of the content from all of the web sites, and aggregated them in the Blog TOC on this blog. I’ve done my best to make it navigable, including the ability to collapse the long descriptions, so that you can more easly view just the blog post or video titles. I’ve categorized it by important keywords, so that a developer working with Word Automation Services or with PowerTools for Open XML can find all relevant content. You can get to this table-of-content by clicking the Blog Table of Contents link in the blue bar under the header.

I am just about to embark on some interesting writing and screen-casting projects, so wanted to get this blog TOC under control before I started.

Comments (3)

New Paper published by Peter O’Kelly – Revisiting Open Document Format and Office Open XML: The Quiet Revolution Continues

Three years ago Peter O’Kelly wrote a paper titled, “What’s Up, .DOC? Open XML Formats, OpenDocument Format, and the Revolutionary Implications of XML in Productivity Applications.” That paper was a part of an industry-wide debate about Open XML and ODF. He has recently published a new paper that analyzes the current state of document formats.

This new paper, Revisiting Open Document Format and Office Open XML: The Quiet Revolution Continues, discusses:

  • The business value of standardized, XML based document formats
  • A brief history of Open XML and ODF
  • The 2008 Open XML ISO controversy, and the response to Peter’s “What’s Up, .DOC?” Paper
  • An assessment of current Open XML and ODF market dynamics
  • Current standards activity
  • Projections into the future

It is interesting reading for document format wonks.

Comments

Join us for a live web-cast on DocumentBuilder 2.0 on September 7 at 8:00 AM PST

Bob McClellan and I will be hosting a live web-cast on Sept 7 at 8:00 AM PST.  We’ll be demoing some new functionality in DocumentBuilder 2.0, discussing the future of PowerTools for Open XML and DocumentBuilder, and taking questions and comments about it.  We’d love to hear your feedback, as well as ideas for enhancements. And if we run out of stuff to talk about with DocumentBuilder, any Open XML topic or question is fair game.

So if, like me, you can’t think of anything more fun than getting online with some other geeks, and discussing interrelated markup, document composability, and the intricacies of Open XML WordprocessingML, please join us!

You can find all the details in this blog post at OpenXMLDeveloper.org.

Comments (7)

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »