[topicmapmail] Compact Topic Maps Syntax -- A modest proposal

thomas thomas@stray.net
Tue, 14 Feb 2006 16:00:12 +0100


hi,

although dict.leo.org couldn't help me find out what a "gut reaction" might 
be, i'd like to give some remarks:

* '>' and '>>' don't seem intuitive to me.
  i would expect that the type is bigger than the instance as well as the
  supertype bigger than the subtype. but the '>' and '>>' point in the
  opposite direction, from instance to type and from subtype to supertype.
  or should i think of a tree?

* why the use of paranthesis in this case:
        foaf:name "Giacomo Puccini" ( 'puccini, giacomo' /tm:sort/ ) ;
  but not in that case:
        dc:title "Madama Butterfly" , "Madame Butterfly" /lang:en lang:fr/ ;
  ?

* the way associations are handled is not intuitive.
  i would expect another ordering: first the subject, then the
  association-type, then the object(s). but when i read the topic element,
  i have to mentally put the topic in after the assoc-element, although
  in all other lines i have to mentally put it in the first place.
  one solution could be to change the order of the association element, 
e.g.:
        @assoc  ex:victim  music:killed-by  ex:perpetrator  ex:method .
  but i think it's better to stick to the XTM-practice of holding 
associations
  seperate from topics. that would change:
        :cio-cio-san > music:character "Cio-cio-san" ;
          music:appears-in :butterfly ;
          music:killed-by  :cio-cio-san  :stabbing .
  to:
        :cio-cio-san > music:character "Cio-cio-san" ;
          music:appears-in :butterfly
        music:killed-by  :cio-cio-san  :cio-cio-san  :stabbing .
  this also makes more sense semantically, since if you write it like
  subject-predicate-object, why should you care to define an association at 
all?
  (which may indeed be a question? may it?)

ciao
thomas


--On Dienstag, 14. Februar 2006 14:52 Uhr +0100 Steve Pepper 
<pepper@ontopia.net> wrote:

> [This is a slightly updated version of a note sent to the
> WG3 mailing list.]
>
> I've been playing around with CTM [1] and come up with a
> (partial) syntax that I think seems promising. It is
> essentially an amalgam of the best in LTM and AsTMa=, with
> certain features inspired by the RDF N3 syntax.
>
> Here's an example. Some explanation follows, but I think
> the example is mostly self-explanatory -- which is an
> important goal for CTM, I think.
>
> ---------
>
> @prefix music:  <http://psi.ontopia.net/music/#> .
> @prefix music2: <http://www.kanzaki.com/ns/music#/> .
> @prefix wiki:   <http://en.wikipedia.org/wiki/> .
> @prefix lang:  <http://www.topicmaps.org/xtm/1.0/language.xtm#> .
>
> @names  foaf:name  dc:title .
>
> @assoc  music:composed-by  music:work  music:composer .
> @assoc  music:influenced-by  ex:object  ex:agent .
> @assoc  music:killed-by  ex:victim  ex:perpetrator  ex:method .
>
>
> wiki:Puccini > music:composer
>   foaf:name "Giacomo Puccini" ( 'puccini, giacomo' /tm:sort/ ) ;
>   bio:dateOfBirth  "1858-12-22"^xsd:date .
>
> :butterfly > music:opera
>   dc:title "Madama Butterfly" ,
>            "Madame Butterfly" /lang:en lang:fr/ ;
>   music:synopsis  <http://www.metopera.org/synopses/madama.html> ;
>   music:composed-by  :puccini ;
>   music:influenced-by :iris .
>
> :cio-cio-san > music:character "Cio-cio-san" ;
>   music:appears-in :butterfly ;
>   music:killed-by  :cio-cio-san  :stabbing .
>
> music:composer "Composer" >> foaf:Person
>   ~music2:Composer .
>
> ---------
>
> Points to note:
>
> * Minimal use of cryptic delimiters and keywords
> * Almost everything can be expressed as a block of statements about
>   a topic terminated by a period
> * Most of the contents of the block consists of delimiter/topic,
>   topic/topic, or topic/string pairs
> * Item identifiers are preceded by a colon (e.g., :butterfly)
> * Subject identifiers are simply given as URIrefs (e.g. wikip:Puccini)
> * Syntax is greatly simplified through the use of declarations
> * Statements are assumed to be occurrences unless the type is defined
>   as a name or association by an @name or @assoc declaration
> * Association templates allow role types to be omitted
> * String values are always delimited by quotes (single or double):
>   "string"
> * URIrefs are always delimited by less-than and greater-than signs:
>   <http://...>
> * Type-instance and supertype-subtype have special delimiters
>   ('>' and '>>' respectively)
> * Subject identifiers and subject locators have special delimiters
>   ('~' and '=', respectively)
>
> Clearly this proposal is not complete, but I have ideas on how to make
> it so. Before that, though, I would like to hear people's gut reactions
> to it.
>
> Steve
>
> [1] CTM, for those who haven't heard, is a proposed new standard that
> will fulfill the function of LTM and AsTMa= in providing a simple,
> lightweight, text-based syntax for representing topic maps. Further
> documents from the ISO Topic Maps committee are:
>
> Initial work: http://www.jtc1sc34.org/repository/0658.pdf
> New Work Item Proposal: http://www.jtc1sc34.org/repository/0699.pdf
> Use cases: http://www.jtc1sc34.org/repository/0701.pdf
> Meeting notes, Atlanta (Nov 2005):
> http://www.jtc1sc34.org/repository/0702.pdf
>
>
>
> --
> Steve Pepper, Ontopian
>
> Those cartoons: The issue is racism, not free speech --
> http://www.socialistworker.co.uk/article.php?article_id=8267
>
>
> _______________________________________________
> topicmapmail mailing list
> topicmapmail@infoloom.com
> http://www.infoloom.com/mailman/listinfo/topicmapmail



.
mailto:thomas@stray.net
http://stray.net

..
early optimization is the root of many evil
donald e. knuth