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

Steve Pepper sc34wg3@isotopicmaps.org
Sun, 12 Feb 2006 16:07:08 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_0312_01C62FEE.60316690
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

I've been playing around with CTM 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"
  dc:title "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
.

---------

Things to note:
  a.. Minimal use of cryptic delimiters and keywords
  b.. Almost everything can be expressed as a block of statements about a topic terminated by a period
  c.. Item identifiers are preceded by a colon (e.g., :butterfly)
  d.. Subject identifiers are simply given as URIrefs (e.g. wikip:Puccini)
  e.. Syntax is greatly simplified through use of declarations
  f.. Statements are assumed to be occurrences unless the type is defined as a name or association by a prefix
  g.. Association templates allow role types to be omitted in most places
  h.. String values are always delimited by quotes (single or double)
  i.. URIrefs are always delimited by less-than and greater-than signs
  j.. Type-instance and supertype-subtype have special delimiters ('>' and '>>' respectively)
  k.. 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
reactions from the WG.

Steve
--
Steve Pepper, Ontopian

Those cartoons: The issue is racism, not free speech --
http://www.socialistworker.co.uk/article.php?article_id=8267



------=_NextPart_000_0312_01C62FEE.60316690
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I've been playing around with CTM and =
come up with=20
a (partial) syntax that I think seems promising. It is essentially an =
amalgam of=20
the best in LTM and AsTMa=3D, with certain features inspired by the RDF =
N3=20
syntax.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Here's an example. Some explanation =
follows, but I=20
think the example is mostly self-explanatory -- which is an important =
goal for=20
CTM, I think.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>---------</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>@prefix music:&nbsp;<SPAN=20
class=3D931435914-12022006> </SPAN>&lt;</FONT><A=20
href=3D"http://psi.ontopia.net/music/"><FONT face=3D"Courier New"=20
size=3D2>http://psi.ontopia.net/music/</FONT></A><FONT face=3D"Courier =
New"=20
size=3D2>#&gt; .<BR>@prefix music2: &lt;<A=20
href=3D"http://www.kanzaki.com/ns/music#/"><FONT face=3D"Courier New"=20
size=3D2>http://www.kanzaki.com/ns/music#/</FONT></A><FONT =
face=3D"Courier New"=20
size=3D2>&gt; .</FONT></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>@prefix wiki:&nbsp;<SPAN=20
class=3D931435914-12022006>&nbsp; </SPAN>&lt;</FONT><A=20
href=3D"http://en.wikipedia.org/wiki/"><FONT face=3D"Courier New"=20
size=3D2>http://en.wikipedia.org/wiki/</FONT></A><FONT face=3D"Courier =
New"=20
size=3D2>&gt; .<BR></FONT><FONT face=3D"Courier New" =
size=3D2>@prefix&nbsp;<SPAN=20
class=3D931435914-12022006>lang</SPAN>:&nbsp;<SPAN =
class=3D931435914-12022006>=20
</SPAN>&lt;<SPAN class=3D931435914-12022006><A=20
href=3D"http://www.topicmaps.org/xtm/1.0/language.xtm">http://www.topicma=
ps.org/xtm/1.0/language.xtm</A>#</SPAN>&gt;=20
.</FONT></DIV>
<DIV><FONT face=3D"Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" =
size=3D2>@names&nbsp;&nbsp;foaf:name&nbsp;<SPAN=20
class=3D931435914-12022006> </SPAN>dc:title .</FONT></DIV>
<DIV><FONT face=3D"Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>@assoc&nbsp; =
music:composed-by&nbsp;=20
music:work&nbsp; music:composer .<BR>@assoc&nbsp; =
music:influenced-by&nbsp;=20
ex:object&nbsp; ex:agent .<BR>@assoc&nbsp; music:killed-by&nbsp; =
ex:victim&nbsp;=20
ex:perpetrator&nbsp; ex:method .</FONT></DIV>
<DIV><FONT face=3D"Courier New"></FONT>&nbsp;</DIV><FONT =
face=3DArial><FONT=20
size=3D2></FONT><FONT size=3D2></FONT><FONT size=3D2></FONT><FONT =
size=3D2></FONT><FONT=20
size=3D2></FONT>
<DIV><FONT size=3D2></FONT><FONT size=3D2></FONT><FONT =
size=3D2></FONT><FONT=20
size=3D2></FONT><FONT size=3D2></FONT><BR><FONT face=3D"Courier New"=20
size=3D2>wiki:Puccini &gt; music:composer<BR>&nbsp; foaf:name "Giacomo=20
Puccini"<BR>&nbsp;&nbsp;&nbsp;&nbsp; ( 'puccini, giacomo' /tm:sort/ =
)<BR>&nbsp;=20
bio:dateOfBirth&nbsp; "1858-12-22"^xsd:date<BR>.<BR></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>:butterfly &gt;=20
music:opera<BR>&nbsp;&nbsp;<SPAN class=3D931435914-12022006>dc:title=20
</SPAN>"Madama Butterfly"<BR>&nbsp; <SPAN =
class=3D931435914-12022006>dc:title=20
</SPAN>"Madame Butterfly" /<SPAN=20
class=3D931435914-12022006>lang</SPAN>:en&nbsp;<SPAN=20
class=3D931435914-12022006>lang</SPAN>:fr/<BR>&nbsp; =
music:synopsis&nbsp;=20
&lt;</FONT><A =
href=3D"http://www.metopera.org/synopses/madama.html"><FONT=20
face=3D"Courier New"=20
size=3D2>http://www.metopera.org/synopses/madama.html</FONT></A><FONT=20
face=3D"Courier New" size=3D2>&gt;<BR>&nbsp; music:composed-by&nbsp;=20
:puccini<BR>&nbsp; music:influenced-by :iris<BR>.<BR></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>:cio-cio-san &gt; =
music:character=20
"Cio-cio-san"<BR>&nbsp; music:appears-in :butterfly<BR>&nbsp;=20
music:killed-by&nbsp; :cio-cio-san&nbsp; :stabbing<BR>.<BR></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>music:composer "Composer" =
&gt;&gt;=20
foaf:Person<BR>&nbsp; ~music2:Composer<BR>.</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>---------</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Things to note:</FONT></DIV>
<UL>
  <LI><FONT size=3D2>Minimal use of cryptic delimiters and =
keywords</FONT></LI>
  <LI><FONT size=3D2>Almost everything can be expressed as a block of =
statements=20
  about a topic terminated by a period</FONT></LI>
  <LI><FONT size=3D2>Item identifiers are preceded by a colon (e.g.,=20
  :butterfly)</FONT></LI>
  <LI><FONT size=3D2>Subject identifiers are simply given as URIrefs =
(e.g.=20
  wikip:Puccini)</FONT></LI>
  <LI><FONT size=3D2>Syntax is greatly simplified through use of=20
  declarations</FONT></LI>
  <LI><FONT size=3D2>Statements are assumed to be occurrences unless the =
type is=20
  defined as a name or association by a prefix</FONT></LI>
  <LI><FONT size=3D2>Association templates allow role types to be =
omitted in most=20
  places</FONT></LI>
  <LI><FONT size=3D2>String values are always delimited by quotes =
(single or=20
  double)</FONT></LI>
  <LI><FONT size=3D2>URIrefs are always delimited by less-than and =
greater-than=20
  signs</FONT></LI>
  <LI><FONT size=3D2>Type-instance and supertype-subtype have special =
delimiters=20
  ('&gt;' and '&gt;&gt;' respectively)</FONT></LI>
  <LI><FONT size=3D2>Subject identifiers and subject locators have =
special=20
  delimiters ('~' and '=3D', respectively)</FONT></LI></UL>
<DIV><FONT size=3D2>Clearly this proposal is not complete, but I have =
ideas on how=20
to make it so. Before that, though, I would like to hear reactions from =
the=20
WG.<BR></FONT></DIV>
<DIV><SPAN class=3D931435914-12022006><FONT=20
size=3D2>Steve</FONT></SPAN></DIV></FONT>
<P><FONT size=3D2>--<BR>Steve Pepper<SPAN class=3D931435914-12022006>,=20
Ontopian</SPAN></FONT></P>
<P><EM><FONT color=3D#808080 size=3D2>Those cartoons: The issue is =
racism<SPAN=20
class=3D931435914-12022006>, not free speech --</SPAN><BR></FONT><A=20
href=3D"http://www.socialistworker.co.uk/article.php?article_id=3D8267"><=
FONT=20
color=3D#808080=20
size=3D2>http://www.socialistworker.co.uk/article.php?article_id=3D8267</=
FONT></A></EM></P>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P></BODY></HTML>

------=_NextPart_000_0312_01C62FEE.60316690--