Templates: Quick overview of Open XML files (aka boring as hell post)

(This post was pre-recorded. I'll follow up on any comments when I'm back).


This is really a brief overview of the terminology around Open XML files before we actually look at how it applies to Access 2007 template files.


First of all, Open XML files are really a set of files (the majority of which are XML reference schema files) and folders all ZIPed into a single package. This whole package is what we call the Open XML file.


Each package has a number of parts and as such a group of parts defines a document. Parts are XML or non-XML (binary such as JPEG, PNG, etc) files within the Open XML file. Generally, parts will describe application data (such as settings and preferences), meta-data (such as how each part relate to the entire Open XML file) and plain data (such as text in a Word document).


Parts are reasonably self-contained, so they can be copied, edited or exchanged between different documents in a straightforward manner.


Finally, in order to understand what role do parts fill and how they fit into the big pictures, the Open XML files have meta-data that define the relationship between parts. These relationships are described in XML and define a connection between a “source” and a “target” part, such as between text and an image that appear in that text. Relationships give a lot of flexibility to Open XML files, since one can navigate and figure out how the document is inter-related without having to actually look at the parts and its contents. Within parts, all references to relationships are represented using a Relationship ID, which allows all connections between parts to stay independent of content-specific schema.

So the keywords to keep in mind are parts and relationships, with a dash of XML. Alright, this has been the 5-minute crash course on Open XML files. This should suffice for us to understand what Access templates are made of, but it is woefully inadequate for any serious programming against such files. So, if you are an Office Developer (not one who works for Microsoft J, but someone who writes a lot of code against Office apps), I recommend you dig a little deeper into these pointers for more information since this will be the bread and butter of Office 2007.


Here are some whitepapers so you can read on the concepts in more detail:

The Microsoft Office Open XML Formats: New File Formats for "Office 12" It’s a general overview of the file format, and is targeted at multiple audiences. It starts off with an introduction about what’s going on and also briefly touches on the history of the current binary formats and where we are today.

The Microsoft Office Open XML Formats: Preview for Developers - This paper talks more about the architecture of the formats and is targeted at developers. This paper has a similar introduction to the first (but from a slightly different angle). The last 7 or so pages of the paper go into solutions and what people can do with these files.

And here are some free videos about the file formats and how it all fits the Microsoft Office suite:

Unfortunately, there is no video about the Open XML file format and Access, but that’s mainly why I’m writing these posts anyway J. This way at least you don’t have to hear my whiny voice, so it’s definitely your lucky day.


You should also check out Brian Jones’ blog, which talks extensively about Open XML files. Also, there is this web site where Open XML developers share tips and techniques about Open XML development topics.