[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> </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> </DIV>
<DIV><FONT face=3D"Courier New" size=3D2>---------</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Courier New" size=3D2>@prefix music: <SPAN=20
class=3D931435914-12022006> </SPAN><</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>#> .<BR>@prefix music2: <<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>> .</FONT></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>@prefix wiki: <SPAN=20
class=3D931435914-12022006> </SPAN><</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>> .<BR></FONT><FONT face=3D"Courier New" =
size=3D2>@prefix <SPAN=20
class=3D931435914-12022006>lang</SPAN>: <SPAN =
class=3D931435914-12022006>=20
</SPAN><<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>>=20
.</FONT></DIV>
<DIV><FONT face=3D"Courier New"></FONT> </DIV>
<DIV><FONT face=3D"Courier New" =
size=3D2>@names foaf:name <SPAN=20
class=3D931435914-12022006> </SPAN>dc:title .</FONT></DIV>
<DIV><FONT face=3D"Courier New"></FONT> </DIV>
<DIV><FONT face=3D"Courier New" size=3D2>@assoc =
music:composed-by =20
music:work music:composer .<BR>@assoc =
music:influenced-by =20
ex:object ex:agent .<BR>@assoc music:killed-by =
ex:victim =20
ex:perpetrator ex:method .</FONT></DIV>
<DIV><FONT face=3D"Courier New"></FONT> </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 > music:composer<BR> foaf:name "Giacomo=20
Puccini"<BR> ( 'puccini, giacomo' /tm:sort/ =
)<BR> =20
bio:dateOfBirth "1858-12-22"^xsd:date<BR>.<BR></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>:butterfly >=20
music:opera<BR> <SPAN class=3D931435914-12022006>dc:title=20
</SPAN>"Madama Butterfly"<BR> <SPAN =
class=3D931435914-12022006>dc:title=20
</SPAN>"Madame Butterfly" /<SPAN=20
class=3D931435914-12022006>lang</SPAN>:en <SPAN=20
class=3D931435914-12022006>lang</SPAN>:fr/<BR> =
music:synopsis =20
<</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>><BR> music:composed-by =20
:puccini<BR> music:influenced-by :iris<BR>.<BR></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>:cio-cio-san > =
music:character=20
"Cio-cio-san"<BR> music:appears-in :butterfly<BR> =20
music:killed-by :cio-cio-san :stabbing<BR>.<BR></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>music:composer "Composer" =
>>=20
foaf:Person<BR> ~music2:Composer<BR>.</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Courier New" size=3D2>---------</FONT></DIV>
<DIV><FONT size=3D2></FONT> </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
('>' and '>>' 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> </P></BODY></HTML>
------=_NextPart_000_0312_01C62FEE.60316690--