TTNewsML

Overview

For customers of TT Nyhetsbyrån who prefer xml, TT also offer TTNewsML. In TTNewsML the text is handled as a newsItem inside a newsMessage. For other objects than text the content type will differ. See below.

TTNewsML is an IPTC NewsML-G2 2.30 compliant translation of TTNinjs where each field somehow relates back to the original ttninjs. So for descriptions of what various properties mean and their usage in TTNinjs, metadata and namespaces pages work equally well for the xml version.

More information about NewsML from IPTC can be found here. For a detailed description of how TT uses NewsML see here

Body content

The displayable payload of a TTNewsML text-object can be found in one of the contentSet/inline-elements. The format of the inlineXML element is the same html5 as in the corresponing body_ properties of the TTNinjs version. The attribute contenttypevariant of the inline-element will indicate if it contain normal html5 or richhtml5. For planning items and events the body_html-parts can be found in the contentWrapper element.

For a specification of the normal html5 see here.

In 2020 TT Nyhetsbyrån added a variant of html5 with more features. It is placed in an inlineData-element. The attribute value of contenttypevariant = richhtml5 indicate this and it has its own specification here.

Metadata

Description on what the various metadata fields contain and mean can be found here.

Dates

Further reading on how TT Nyhetsbyrån handle dates in metadata. And the meaning of different date and time fields.

Revisions

Description on how TT Nyhetsbyrån handle revisions.

Events

In the xml variant an event will be handled as a conceptItem, of type event, inside a newsMessage. Some of the event data have assigned elements in the eventDetails. Some have been added as contentMetaExtProperties. The displayable html5-text for each event is placed in the TT-namespaced extension contentWrapper under contentMeta.

See TTNewsML for more details

Planning

A planning object will in TTNewsML be handled as a planningItem inside a newsMessage. Metadata that does not have assigned elements in NewsML have been included as contentMetaExtProperties. The displayable html5-text for the planning is placed in the TT-namespaced extension contentWrapper under contentMeta.

A planning can have assignments attached. They will be handled as newsCoverage in the newsCoverageSet. Each newsCoverage might have a delivery with one or more deliveredItemRef's. Regardless the name of the element the article might not have been delivered yet.

<newsCoverageSet>
    <newsCoverage>
        <planning modified="2019-11-26T10:33:15+01:00">
            <itemClass qcode="ninat:video"/>
            <headline>SOS Alarm presenterar en säkrare 112-tjänst</headline>
            <planningExtProperty type="ttext:guid" literal="53c23277-e3ea-4e26-9bda-40428c07e48c"/>
            <planningExtProperty type="ttext:planning" literal="f709edd1-dc3b-4673-82c3-f29601635ec5"/>
        </planning>
    </newsCoverage>
    <newsCoverage>
        <planning modified="2019-11-26T10:33:15+01:00">
            <itemClass qcode="ninat:graphic"/>
            <headline>SOS Alarm presenterar en säkrare 112-tjänst</headline>
            <planningExtProperty type="ttext:guid" literal="8e71dd80-9d8b-4531-b0c0-0adbc51fa84c"/>
            <planningExtProperty type="ttext:planning" literal="f709edd1-dc3b-4673-82c3-f29601635ec5"/>
        </planning>
    </newsCoverage>
    <newsCoverage>
        <planning modified="2019-11-26T10:33:15+01:00">
            <itemClass qcode="ninat:text"/>
            <headline>SOS Alarm presenterar en säkrare 112-tjänst</headline>
            <planningExtProperty type="ttext:guid" literal="0d787e45-97c5-4e71-b430-2c12049112e7"/>
            <planningExtProperty type="ttext:planning" literal="f709edd1-dc3b-4673-82c3-f29601635ec5"/>
        </planning>
        <delivery>
            <deliveredItemRef href="http://tt.se/media/text/829f0b61-0c8d-4f73-a074-09f69cfaa190" rel="ttext:article"/>
            <deliveredItemRef href="http://tt.se/media/text/febb9dfd-ab1b-4626-b287-cda833b69b0c" rel="ttext:article"/>
        </delivery>
    </newsCoverage>
</newsCoverageSet>

See TTNewsML for more details

Sport data

TT produce sport data in a separate system. The xml-files follow the NewsML-G2 schema but the content is a bit different compared to text items. The guid is built from the original id in the sport-data system. And the profile is DATA:

    <newsItem guid="http://tt.se/media/text/20191208:TT:0219:0"
    ...
    <contentMetaExtProperty type="ttext:profile" literal="DATA"/>

The sport-data system have the older TTNITF as production format. NewsML items with sport-data have the content in the body_html5 property. It is mainly represented in div's with classes showing the original element name. If you need the original TTNITF format with sport-data you can select to have that delivered instead:

    <article>
    <section class="sport">
        <h1 class="sport-discipline">alpint</h1>
        <h1 class="sport-location">BEAVER CREEK, Colorado</h1>
        <h1 class="sport-what">Världscupen</h1>
        <div class="result">
            <h2 class="result-vad">herrar, storslalom</h2>
            <div class="result-txt">
                <p>1) Tommy Ford, USA, 2.31,25 (1.16,40+1.14,85), 2) Henrik Kristoffersen,
                    Norge, 2.32,05 (1.16,63+1.15,42), 3) Leif Kristian Nestvold-Haugen, do,
                    2.32,48 (1.16,60+1.15,88), 4) Zan Kranjec, Slovenien, 2.33,00
                    (1.17,11+1.15,89), 5) Victor Muffat-Jeandet, Frankrike, 2.33,03
                    (1.17,58+1.15,45), 6) Mathieu Faivre, do, 2.33,31 (1.17,47+1.15,84), 7)
                    Trevor Philp, Kanada, 2.33,34 (1.17,19+1.16,15), 8) Filip Zubcic,
                    Kroatien, 2.33,35 (1.18,43+1.14,92), 9) Gino Caviezel, Schweiz, 2.33,56
                    (1.17,86+1.15,70), 10) Justin Murisier, do, 2.33,64
                    (1.17,58+1.16,06).</p>
            </div>
        </div>

Samples

  • Flash (TT-FLASH.xml)

    • For big breaking news the coverage can start with a short news-FLASH.
  • News-items

    • This is a stand-alone news item in the economy sector. (ekonomi_virusvolvoKORR.xml)
    • An item updated in several steps and therefore a big revisions property. (revisions_virusskolaUV3KORR.xml)
    • NewsItem with twitter embed. (twitter_embed.xml)
    • NewsItem with instagram embed. (instagram_embed.xml)
  • Editiorial information

    • A short item with editorial info from TT to the customers. (tillred.xml)
    • An event as a concept item. (event.xml)
    • A planning item. (planning.json)
  • Feature story

    • Feature items are often longer, with several parts in the html5 and many images. (feature_bostadv49.xml)
  • Sports data

    • Summary of result from ranked competition. (alpint_storslalom.xml)
    • Individual game result. (innebandy_resultat.xml)
    • Series round with game results and standing. (ishockey_nhl.xml)

The samples can be downloaded as a zip here.