J.4.2 Understanding the Function of a Document

J.4.2 Understanding the Function of a Document

With the understanding that it is a futile exercise to attempt to categorize every type of document function, Office Open XML leaves it to developers, and document authors, to generate functionally- specific templates for use by themselves and others. It is in this spirit that the function of most documents can be hinted at by looking at the template used.

Consider a presentation is created using a template for 2008 External Pitch Books. By examining the application properties part ( \docProps\appdata.xml ), one can find the template element that defines the template used to create the presentation.

For example, the previously mentioned presentation’s appdata would look like this:

<Properties xmlns =
  "http://purl.oclc.org/ooxml/officeDocument/extendedProperties"
  xmlns:vt =
    "http://purl.oclc.org/ooxml/officeDocument/docPropsVTypes">
  <Template>2008 External Pitch Book</Template>
  <TotalTime>0</TotalTime>
  <Words>4</Words>
</Properties>

By leveraging the template property in this way, developers and document authors have the flexibility to define the taxonomy of document functionalities that suits their particular needs.

It is worth pointing out that there are other mechanisms that can be used to evaluate the function of a document. An additional method would be to add a custom document property. The XML below adds a new property called “Document Function” in the custom.xml part that specifies the function of the current document.

<Properties
xmlns="http://purl.oclc.org/ooxml/officeDocument/customProperties"
xmlns:vt="http://purl.oclc.org/ooxml/officeDocument/docPropsVTypes">
  <property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="2"
    name="Document Function">
    <vt:lpwstr>Quarterly Sales Report</vt:lpwstr>
  </property>
</Properties>
Last updated on