DOKK Library

LTM – Cheat-sheet

Authors Patrick Durusau

License CC-BY-3.0

Plaintext
              LTM – Cheat-sheet                      Subject Indicators (zero or more)

Ontopia developed Linear Topic Map notation         @”URL”
(LTM) as a text format for topic maps. Its brevity
eases hand authoring of topic maps. (Line returns, Subject Locator (only one)
tabs, etc., are used for presentation below. Single
spaces have the same meaning.)                      %”URL”

Topics                                               Occurrences

Minimal topic – ID between square [ ] brackets.      {ID of topic with occurrence,

Base/Sort/Display Names                              ID of occurrence role type,

[ID = “basename”;                                    [and]
      “sortname”;
      “displayname”]                                 “locator of occurrence”} / scope [optional]

To skip sortname, use ;; to signal its missing.      or

Repeat base/sort/display cluster for a topic:        [[resource data inline]]} / scope [optional]

   =     “basename”;                                 Associations
         “sortname”;
         “displayname”]                              type(player : role[opt], player : role [opt])

Scope on Names                                       Scope associations, following “)” with “/ scope”

Names are scoped with “/ “ , followed by a topic     If no roles, defaults to topic type. Topic definition,
ID.                                                  […], can appear as player.

[ID = “basename” / scope                             Reification
…]
                                                     Names
A single “/” operator scopes the base/sort/display
name group.                                          [ID = “basename” ~ topicid ….]

Variant Names                                        [ID = “basename” / scope ~ topicid ….]

Appear after displayname (if any).                   Occurrences

(“variant” / scope)                                  {topicid, type, locator/resource data} ~ topicid

Variant names always have scope.                     Associations

Topic Type                                           type(player : role, player : role) ~ topicid

[ID : type (one or more topicids), ws separated) =
Directives                                            General Unicode escape syntax: \u0000

Directives are written #DIRECTIVE                         Escape Sequence               Character

#TOPICMAP ~ topicmap                                           \u0022                        “
                                                               \u0027                        '
Creates topic with ID of topicmap.                             \u005B                        [
#MERGEMAP “URL” “xtm|hytm|astma”                               \u005D                        ]
                                                               \u007B                        {
Specifies external topic map for merging. If not
LTM syntax, must specify the syntax.                           \u007D                        }

Topics with same IDs will not merge.
                                                 Syntax summary by Patrick Durusau of “The
#INCLUDE “file.ltm”                              Linear Topic Map Notation: Definition and
                                                 Introduction,” version 1.3 by Lars Marius Garshol.
Same namespace for IDs, topics with same ID will http://www.ontopia.net/download/ltm.html
merge. LTM files only.
                                                 Consult the original description by Lars Marius
#BASEURI “URL”                                   Garshol for details.
Changes the base URI against which following          I blog about topic maps at: Another Word For It.
relative URIs are resolved.
                                                      Email: patrick@durusau.net
#PREFIX
                                                      Twitter: @patrickdurusau
Enables reference to a topic in merged topic map
by its subject indicator/locator.                     Skype: pdurusau
#MERGEMAP “file” “type”                               In addition to topic maps, I edit standards, such as
#PREFIX prefix @ | % “URL#”                           OpenDocument Format (ODF), supported by MS
                                                      Word, Apache Open Office, Libre Office, Calligra
then use prefix                                       Office and better word processing software
                                                      everywhere, and work in markup and digital
prefix:ID                                             humanities projects.
#VERSION “1.3” (must appear first among               Version 0.1.
directives if present)
                                                      This work licensed under Creative Commons
Encoding @”encoding”                                  Attribution 3.0 Unported. Derived from
                                                      http://www.ontopia.net/download/ltm.html.
Declared if not ISO 8859-1. (At beginning of file.)

Escape Syntax

Double quote, write it twice in string:

[doublequote : character = “The '””' character”]