L.6.3 Custom XML Data

Within an Office Open XML document, it is sometimes desirable or necessary to store custom XML data (that is, data in a format not defined by this Office Open XML specification) within the contents of the package. To accommodate this need, Office Open XML allows the storage of any arbitrary XML within a package as the target of the http://purl.oclc.org/ooxml/officeDocument/relationships/customXml relationship (source parts are listed within Part 1).

The following examples illustrate potential uses of this mechanism:

A document which collects and displays information from a backend data source might want to store the original form of that backend data, so it can be manipulated and uploaded to the original data source at a later date. A document author might wish to store additional metadata in an XML format not defined by this Office Open XML specification’s existing metadata schemas. A document management system might wish to store data tracking the workflow status, retention policies, and so on for this document along with the document.

Once present within a package, this custom XML data must be maintained as a distinct part separate from the contents of the document, spreadsheet, or presentation. If there are multiple distinct streams of custom XML data, each is maintained as a separate part within the package, so that each can be manipulated independently of all others.

Each Custom XML Data part can also have an implicit relationship to a Custom XML Data Properties part which stores:

The target namespace of all XML schemas which must be used to validate the content of the custom XML data part. A GUID which must remain constant over the lifetime of this part (and can therefore be used to uniquely identify it).

Last updated on