title: Strategies for embedding change tracking in a structured data document format
body: <p>When designing a specialized structured-data document format (perhaps upon XML): part of the requirements for this document format are that it accommodates, in a metadata section, a history of meaningful (app-level) changes to the structured data at a field level.</p>
  
  <p>At minimum, useful tracked information would be:</p>
  
  <ul>
  <li>an author identifier</li>
  <li>time stamp</li>
  <li>type of change</li>
  <li>what it was changed from</li>
  </ul>
  
  <p>Both data items and any lists of such data items are to be tracked meaningfully, efficiently.  The data schema should be separable/unaware of the metadata tracking it - although facilitating annotations such as node identifiers could be required.  A trusted application could be required to enforce the tracking; however, it would be a benefit to be able to calculate the "deltas" at intervals by comparing data-sections between versions rather than requiring the editor to track each change live.  </p>
  
  <p>"Meaningful" tracking may involve the metadata schema treating <em>higher-level</em> data changes atomically - such as an update to a group of fields which is treated at the application level as one data-point.</p>
  
  <p>For character-by-character or byte-by-byte data, diff/patch type algorithms work.  Structured data (to be treated as structured) seems to me to require more complex solutions.</p>
  
  <p>I realize that I don't have very well-defined requirements - the purpose of my question here is to find out where these problems have been considered with more elegance.</p>
  
  <p><strong>What strategies exist for embedding change tracking in a structured data document format?</strong></p>
  
  <p>Thanks!</p>