Revisions of news objects

Overview

This mainly concern text objects delivered from TT. Other objects handle new version in another manner, described at the end of this page. Each text item have a unique uri, regardless if it is the first version or an update to an earlier version. The reason for this is that during breaking news events texts are being produced rapidly by several reporters. They can replace the earlier version or be a separate take. At some point these items can be updated by one new item. But the process can continue from that point.

A full news story from TT can be created once and not replaced but is often a result of a chain of replacements. Each replacement can replace one or many of the previous broadcasts.

Replacing

The first signal that a text item replace an earlier version is through the replacing property. One or more previous uri's can be listed here.

replacing: [
"http://tt.se/media/text/191125-bostadv48-1107534"
]

(In TTNewsML the replacing is shown under itemMeta in the link element showing previousVersion.)

<link rel="irel:previousVersion" 
      href="http://tt.se/media/text/191125-bostadv48-1107534"/>

Replaced by

A text item that has been replaced will get a property replacedby indicating which item it has been replaced by. Replaced by is a single uri string of the document that has replaced this document since an item can only be replaced by one item, regardless if that item is replacing several items. Customers normally do not see this since TT do not repeat the news item with this property set. And normal searches only show valid items. But customers storing TT-items in their local systems should implement something similar so that replaced versions are not used by misstake. A replaced item will also have the pubstatus set to replaced.

pubstatus: "replaced",
...
replacedby: "http://tt.se/media/text/191125-bostadv48korr-1112959"

(In TTNewsML there is no element showing replacedby. But the pubstatus is changed to replaced here too.)

Revision history

Additionally there is a revisions section that, for each document, holds the entire revision history for all things up until the current document (not updated in future replacements).

First line is first version

A new chain of documents also holds itself in the revisions section. So the first version of a text item will already from the start point at itself.

uri: "http://tt.se/media/text/1"
slug: "usa-val"
...
revisions: [

  # first version also has an entry in the history
  {uri:"http://tt.se/media/text/1", slug:"usa-val", versioncreated:"2015-04-10T10:25:32+02:00"}

]

Each replacement is added

For each new version, one row in the array is added refering to the previous.

uri: "http://tt.se/media/text/2"
slug: "usa-valUV1"
replacing: ["http://tt.se/media/text/1"]
...
"revisions": [

  # previous version entry
  {uri:"http://tt.se/media/text/1", slug:"usa-val", versioncreated:"2015-04-10T10:25:32+02:00"}

  # new version entry
  {uri:"http://tt.se/media/text/2", slug:"usa-valetUV1", versioncreated:"2015-04-10T12:25:32+02:00",
   replacing:["http://tt.se/media/text/1"]}

]

Merged documents copies all revisions

If we replace two (or more) documents, each with their own revision chains, we copy all revision history together, in order.

First document

uri: "http://tt.se/media/text/2"
slug: "usa-valUV1"
replacing: ["http://tt.se/media/text/1"]
...
"revisions": [

  {uri:"http://tt.se/media/text/1", slug:"usa-val", versioncreated:"2015-04-10T10:25:32+02:00"}
  {uri:"http://tt.se/media/text/2", slug:"usa-valetUV1", versioncreated:"2015-04-10T12:25:32+02:00",
   replacing:["http://tt.se/media/text/1"]}

]

Second document

uri: "http://tt.se/media/text/12"
slug: "usa-clinton-UV1"
replacing: ["http://tt.se/media/text/11"]
...
"revisions": [

  {uri:"http://tt.se/media/text/11", slug:"usa-clinton", versioncreated:"2015-04-10T11:25:32+02:00"}
  {uri:"http://tt.se/media/text/12", slug:"usa-clintonUV1", versioncreated:"2015-04-10T13:25:32+02:00",
   replacing:["http://tt.se/media/text/11"]}

]

Merged document

The order in replacing is preserved in how previous revision history is copied.

uri: "http://tt.se/media/text/42"
slug: "usa-altogether"
replacing: ["http://tt.se/media/text/2", "http://tt.se/media/text/12"]
...
"revisions": [

  # Entire first document revisions
  {uri:"http://tt.se/media/text/1", slug:"usa-val", versioncreated:"2015-04-10T10:25:32+02:00"}
  {uri:"http://tt.se/media/text/2", slug:"usa-valetUV1", versioncreated:"2015-04-10T12:25:32+02:00",
   replacing:["http://tt.se/media/text/1"]}

  # Entire second document revisions
  {uri:"http://tt.se/media/text/11", slug:"usa-clinton", versioncreated:"2015-04-10T11:25:32+02:00"}
  {uri:"http://tt.se/media/text/12", slug:"usa-clintonUV1", versioncreated:"2015-04-10T13:25:32+02:00",
   replacing:["http://tt.se/media/text/11"]}

  # New entry
  {uri:"http://tt.se/media/text/42", slug:"usa-altogether", versioncreated:"2015-04-10T16:25:32+02:00",
   replacing:["http://tt.se/media/text/2", "http://tt.se/media/text/12"]}

]

(In TTNewsML the revisions history is included in a xml section under the TT-namespace, as an extension to NewsML.)

<revisions xmlns="http://tt.se/spec/newsml">
  <revisionItem 
    reluri="http://tt.se/media/text/191125-bostadv48-1107534">
    <slug>Bostadv48</slug>
    <versionCreated>2015-04-10T10:25:32+02:00<versionCreated>
  </revisionItem>
  <revisionItem 
    reluri="http://tt.se/media/text/191125-bostadv48korr-1112959">
    <slug>Bostadv48KORR</slug>
    <versionCreated>2015-04-10T16:25:32+02:00<versionCreated>
    <replacing 
      reluri="http://tt.se/media/text/191125-bostadv48-1107534"/>
  </revisionItem>
</revisions>

Samples

We have a package of real-world examples that show the above. It starts with

ukrainaoro-f44bfa3d

and continues with

ukrainaorouv-42563798

ukrainaorouv2-0b73f7d5

ukrainaorouv2oms-de5b7beb

ukrainaorouv3-b0f2161c

ukrainaorouv3korr-b2de95d4

ukrainaorouv4-de8c9f93

At this point it gets separated into three branches

ukrainaorouv5-865968d8

ukrainaorouv6-0715139a

ukrainaorouv6-97774909

(This is not intentional but probably an effect of a fast moving news event developing.)

It is then brought back into one main branch with

ukrainaorouv7oms

The samples as TTNINJS can be downloaded as a zip here.

The samples as TTNEWSML can be downloaded as a zip here.







Events and Planning items

Events and planning items are updated using the same uri. But newer versions have higher version numbers than earlier versions. Both events and planning can have very frequent updates, especielly when the planning is about a fast evolving news story. In the TT systems the latest version is shown/delivered. Customers who are retrieving/receiving all items to their own systems should make sure that replaced items are not accidentally used.

uri: "http://tt.se/media/job/f709edd1-dc3b-4673-82c3-f29601635ec5",
type: "planning",
...
version: "8",
versioncreated: "2019-11-26T10:33:15+01:00"

(In TTNewsML this is shown in the guid and version of the item.)

<planningItem 
  guid="http://tt.se/media/job/f709edd1-dc3b-4673-82c3-f29601635ec5" 
  version="8">
  ...
  <versionCreated>2019-11-26T10:33:15+01:00</versionCreated>