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: jtc1sc34@scc.ca http://www.jtc1sc34.org |
For these use case solutions the current CTM draft (dated July 2nd, 2007) is used.
john
john isa person
john isa http://psi.example.org/music/guitarist
Alternative (using the "prefix" directive):
%prefix music http://psi.example.org/music/ john isa music:guitarist
john isa singer isa guitarist
http://psi.example.org/beatles/john isa singer isa guitarist
john - "John Lennon"
Alternative
john -: "John Lennon"
%prefix beatles http://psi.beatles.example.org/ beatles:The_Beatles -: "The Beatles"
= http://beatles.com/ - "Official website of The Beatles"
john - fullname: "John Ono Lennon"
john - http://psi.example.org/fullname: "John Ono Lennon"
john - "John Ono Lennon" @fullname
or
john -: "John Ono Lennon" @fullname
%prefix ex http://blabla.org john - "John Ono Lennon" @ex:fullname
beatles - "The Beatles" - "Fab Four" @nickname short
john - fullname: "John Ono Lennon" @yoko
john - "John Lennon" ("lennon, john" @tm:sort)
john - "John Lennon" ( "<b>John Lennon</b>"^^xs:anyType @markup)
john - "John Lennon" (http://link/to/an/image.jpg @image)
revolution-nine - "Revolution No. 9" (9 @number)
# 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/
a-day-in-the-life lyrics: "I read ..."
%prefix ex http://www.blabla.org a-day-in-the-life ex:lyrics: "I read ..."
a-day-in-the-life lyrics: "I read ..." @en
%prefix ex http://bla.org %prefix lang http://language.org a-day-in-the-life ex:lyrics: "I read ..." @lang:en
a-day-in-the-life lyrics: """<html> <head>[...]</head> <body id="lyrics">[...]</body> </html>"""^^xs:anyType
beatles website: http://www.beatles.com/
or
beatles website: "http://www.beatles.com/"^^xs:anyURI
pennylane track-number: 2
or
pennylane track-number: "2"^^xs:integer
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)
created(person : mc-cartney, song : yesterday) @music
song iko musical-work
%prefix ex http://... ex:song iko ex:musical-work
~ tm-reifier - "Beatlestopicmap"
john - "John Ono Lennon" ~ name-of-john-lennon
john - "John Ono Lennon" ("lennon, john" @sort ~ sortname-of-john-lennon)
john website: http://www.lennon.com/ ~ lennons-website
partnership(person: lennon, person: mc-cartney) ~ lennon-mccartney lennon-mccartney - "Lennon / McCartney"
# a single line with comments
# one comment # line 2