Screen-Cast: IdentityManager Internals Part 1

In a previous blog post, I wrote about Keeping Meta-Data with Content Items in Open XML WordprocessingML.  The subject of this blog post is a class IdentityManager, which can post-process an edited WordprocessingML document and help us to maintain metadata for content items, including paragraphs, tables, rows, cells, lists, and list items.

As you can see in the above video, as well as the follow on video, to use the IdentityManager, you first populate a document with content and field codes.  The argument of each field code points into a custom XML part, which contains the actual metadata.  Before the user edits the document, you turn on revision tracking, and further, you lock the document so that revision tracking cannot be turned off.  The user then edits this document, modifying paragraphs, cutting and pasting content, copying and pasting content, inserting or deleting rows in a table, and so on.  All of these operations are recorded in revision tracking markup.  Then you use IdentityManager to accept tracked revisions, and at the same time, make adjustments to the document so that identity and metadata are properly maintained.  IdentityManager is super-important to a very small subset of Open XML developers, and not important at all to most Open XML developers.

IdentityManager is a fairly complicated piece of code.  There are a lot of moving parts.  Of course, if you are using IdentityManager in a fairly straight forward scenario, you will never need to dig into the internals of the IdentityManager class.  However, if you need to extend IdentityManager (or if I need to extend IdentityManager a few years from now), you will want to know how IdentityManager works internally.  Therefore, I’ve recorded three screen-casts that walk through the entire IdentityManager module, explaining how the code works.

Unless you are using IdentityManager, and unless you are going to maintain the internals of IdentityManager, I don’t recommend watching these three videos.  They are super-specific to this code.  They are comprehensive and complete, and unless you are in that small subset of developers who need to maintain or enhance IdentityManager, they are not necessary to you as an Open XML developer.