ISO/IEC JTC 1/SC 34N0897
ISO/IEC JTC 1/SC 34
Information Technology --
Document Description and Processing Languages
TITLE: | Use Case Solutions -- 13250-6 Topic Maps -- Compact Syntax |
SOURCE: | Mr. Lars Heuer; Mr. Gabriel Hopmans; Dr. Sam Gyun Oh; Mr. Steve Pepper |
PROJECT: | WD 13250-6: Information technology - Topic Maps - Compact syntax |
PROJECT EDITOR: | Mr. Lars Heuer; Mr. Gabriel Hopmans; Dr. Sam Gyun Oh |
STATUS: | Project document |
ACTION: | For information and informal comment to working group 3 |
DATE: | 2007-07-31 |
DISTRIBUTION: | SC34 and Liaisons |
REPLY TO: |
Dr. James David Mason (ISO/IEC JTC 1/SC 34 Secretariat - Standards Council of Canada) Crane Softwrights Ltd. Box 266, Kars, ON K0A-2E0 CANADA Telephone: +1 613 489-0999 Facsimile: +1 613 489-0995 Network: [email protected] http://www.jtc1sc34.org |
Compact Topic Maps Syntax - Use Case Solutions
For these use case solutions the current CTM draft (dated July 2nd, 2007) is used.
3.2.1. Topic with an Item Identifier
john
3.2.2. Typed Topic - Using Item Identifiers
john isa person
3.2.3. Typed Topic - Using Subject Identifiers
john isa http://psi.example.org/music/guitarist
Alternative (using the "prefix" directive):
%prefix music http://psi.example.org/music/ john isa music:guitarist
3.2.4. Multityped Topic - Using Item Identifiers
john isa singer isa guitarist
3.2.5. Multityped Topic - Using Subject Identifiers
http://psi.example.org/beatles/john isa singer isa guitarist
3.3.1. Topic with an Item Identifier and Topic Name
john - "John Lennon"
Alternative
john -: "John Lennon"
3.3.2. Topic with a Subject Identifier and Topic Name
%prefix beatles http://psi.beatles.example.org/ beatles:The_Beatles -: "The Beatles"
3.3.3. Topic with a Subject Locator and a Topic Name
= http://beatles.com/ - "Official website of The Beatles"
3.3.4. Typed Topic Name - Using Item Identifiers
john - fullname: "John Ono Lennon"
3.3.5. Typed Topic Names - Using Subject Identifiers
john - http://psi.example.org/fullname: "John Ono Lennon"
3.3.6. Scoped Topic Name - Using Item Identifiers
john - "John Ono Lennon" @fullname
or
john -: "John Ono Lennon" @fullname
3.3.7. Scoped Topic Name - Using Subject Itentifiers
%prefix ex http://blabla.org john - "John Ono Lennon" @ex:fullname
3.3.8. Multi Scoped Topic Name
beatles - "The Beatles" - "Fab Four" @nickname short
3.3.9. Typed and Scoped Names
john - fullname: "John Ono Lennon" @yoko
3.3.10. Topic Name with Variant of datatype String
john - "John Lennon" ("lennon, john" @tm:sort)
3.3.11. Topic Name with Variant of datatype XML
john - "John Lennon" ( "<b>John Lennon</b>"^^xs:anyType @markup)
3.3.12. Topic Name with Variant of datatype URI
john - "John Lennon" (http://link/to/an/image.jpg @image)
3.3.13. Topic Name with Variant with non-TMDM datatype
revolution-nine - "Revolution No. 9" (9 @number)
3.3.14 Typed topic with subject identifier with occurrences and associations
# Creating the templates def has-shoesize($person, $size) $person shoesize: $size # Shoesize is modelled as occurrence end def is-member-of($member, $group) is-member-of(member: $member, group: $group) end http://psi.example.org/beatles/paul isa person has-shoesize 45 is-member-of the-beatles homepage: http://www.paulmccartney.com/
3.4.2. Typed Occurrence of datatype String - Using Item Identifiers
a-day-in-the-life lyrics: "I read ..."
3.4.3. Typed Occurrence of datatype String - Using Subject Identifiers
%prefix ex http://www.blabla.org a-day-in-the-life ex:lyrics: "I read ..."
3.4.4. Scoped Occurrence of datatype String - Using Item Identifiers
a-day-in-the-life lyrics: "I read ..." @en
3.4.5. Scoped Occurrence of datatype String - Using Subject Identifiers
%prefix ex http://bla.org %prefix lang http://language.org a-day-in-the-life ex:lyrics: "I read ..." @lang:en
3.4.6. Occurrence of datatype XML
a-day-in-the-life lyrics: """<html> <head>[...]</head> <body id="lyrics">[...]</body> </html>"""^^xs:anyType
3.4.7. Occurrence of datatype IRI
beatles website: http://www.beatles.com/
or
beatles website: "http://www.beatles.com/"^^xs:anyURI
3.4.7. Occurrence of non-TMDM datatype
pennylane track-number: 2
or
pennylane track-number: "2"^^xs:integer
3.5.1. Creating Associations
created(person : mccartney, song : yesterday)
or with templates:
# Template definition def created($creator, $song) created(person : $creator, song : $song) end mccartney created yesterday
or with template invocation outside of topic declaration
# Template definition def created($creator, $song) created(person : $creator, song : $song) end created(mccartney, yesterday)
3.5.2. Scoped Association
created(person : mc-cartney, song : yesterday) @music
3.5.5. Supertype-Subtype relationship - Using Item Identifiers
song iko musical-work
3.5.6. Supertype-Subtype relationship - Using Subject Identifiers
%prefix ex http://... ex:song iko ex:musical-work
3.6.1 Reification of a Topic Map
~ tm-reifier - "Beatlestopicmap"
3.6.2. Reification of a Topic Name
john - "John Ono Lennon" ~ name-of-john-lennon
3.6.3. Reification of a Variant
john - "John Ono Lennon" ("lennon, john" @sort ~ sortname-of-john-lennon)
3.6.4. Reification of an Occurrence
john website: http://www.lennon.com/ ~ lennons-website
3.6.5. Reification of an Association
partnership(person: lennon, person: mc-cartney) ~ lennon-mccartney lennon-mccartney - "Lennon / McCartney"
3.7.1. Singe line comment
# a single line with comments
3.7.2. Multiline comment
# one comment # line 2