W3C home > Mailing lists > Public > www-rdf-interest@w3.org > February 2000

SV: XMLCAL

From: Greg FitzPatrick <gf@medianet.org>
Date: Tue, 22 Feb 2000 16:44:24 +0100
To: "Tim Berners-Lee" <timbl@w3.org>, <paf@swip.net>, <connolly@w3.org>, <hjelm@w3.org>, <moore@cs.utk.edu>, <pregen@egenconsulting.com>, <bobmah@MIT.EDU>, <fdawson@earthlink.net>, <Doug.Royer@software.com>, <phill@myriad.com>, <David.Madeo@msdw.com>, <Bruce_Kahn@iris.com>, Pär Lannerö <d92-pla@nada.kth.se>, Torbjörn Lager <torbjorn.lager@ling.uu.se>, "Niklas Hjelm" <niklas@medialab.se>
Cc: <www-rdf-interest@w3.org>, <sman@netscape.com>
Message-ID: <NCBBJIFAOLHFMAPPOLHCKEPOCMAA.gf@medianet.org>
Jonas Liljegren went to the trouble of doing the exercise Tim asked for.  I
helped translate, not that Jonas needs that:-)



This example is from chapter 8 in the SKiCal draft - draft-many-ical-ski-01,
I might have taken away too much but this just a demo of a straight transfer
to triples
Okay. Here comes a try.


BEGIN:VCALENDAR
BEGIN:VEVENT
UID:e098h99@washingtonpost.com
EUID:kj08988b@nationalchamberorch.org
CATEGORIES:music,concert
TITLE:Messiah
DTSTART:19991217T200000
RRULE:FREQ=DAILY;INTERVAL=1;COUNT=2
PERSONS;DIPROLE=conductor:Takao Kanayama
PRICE;LABEL="Far side":17USD
ADMISSION;QUALTYPE=AGE;QUALRULE=REQUIRED;QUALVALUE=gt 5:
END:VEVENT
END:VCALENDAR

To create triples I will first build nodes.

We will call the document for #0 and the trailing nodes (anonymous) we will
call #1, #2 and so on.  Remember that class resources begin with capital
letters and property resources begin with small.  e.g..  ical:rrule is a
property and ical:Rrule is a class.


#0 --rdf:type--> ical:Vcalendar
#0 --ical:vevent--> #1
#1 --rdf:type--> ski:Vevent
#1 --ical:uid--> 'e098h99@washingtonpost.com'
#1 --ski:euid--> 'kj08988b@nationalchamberorch.org'
#1 --ical:categories--> 'music'
#1 --ical:categories--> 'concert'
#1 --ical:title--> 'Messiah'
#1 --ical:dtstart--> '19991217T200000'
#1 --ical:rrule--> #2
#2 --rdf:type--> ical:Rrule
#2 --ical:freq--> 'DAILY'
#2 --ical:interval--> '1'
#2 --ical:count--> '2'
#1 --ski:persons--> #3
#3 --rdf:type--> ski:Persons
#3 --ski:diprole--> 'conductor'
#3 --rdf:value--> 'Takao Kanayama'
#1 --ski:price--> #4
#4 --rdf:type--> ski:Price
#4 --ski:label--> 'Far side'
#4 --rdf:value--> '17USD'
#1 --ski:admission--> #5
#5 --rdf:type--> ski:Admission
#5 --ski:qualtype--> 'AGE'
#5 --ski:qualrule--> 'REQUIRED'
#5 --ski:qualvalue--> 'gt 5'
#5 --rdf:value--> ''

Translated to XML/RDF it would look like this.


<ical:Vcalendar>
  <ical:vevent>
    <ical:Vevent>
      <ical:uid>e098h99@washingtonpost.com</ical:uid>
      <ski:euid>kj08988b@nationalchamberorch.org</ski:euid>
      <ical:categories>music</ical:categories>
      <ical:categories>concert</ical:categories>
      <ical:title>Messiah</ical:title>
      <ical:dtstart>19991217T200000</ical:dtstart>
      <ical:rrule>
        <ical:Rrule>
	  <ical:freq>DAILY</ical:freq>
	  <ical:interval>1</ical:interval>
	  <ical:count>2</ical:count>
	</ical:Rrule>
      </ical:rrule>
      <ski:persons>
        <ski:Persons>
	  <ski:diprole>conductor</ski:diprole>
	  <rdf:value>Takao Kanayama</rdf:value>
	</ski:Persons>
      </ski:persons>
      <ski:price>
        <ski:Price>
	  <ski:label>Far side</ski:label>
	  <rdf:value>17USD</rdf:value>
	</ski:Price>
      </ski:price>
      <ski:admission>
        <ski:Admission>
	  <ski:qualtype>AGE</ski:qualtype>
	  <ski:qualrule>REQUIRED</ski:qualrule>
	  <ski:qualvalue>gt 5</ski:qualvalue>
	  <rdf:value></rdf:value>
	</ski:Admission>
      </ski:admission>
    </ical:Vevent>
  </ical:vevent>
</ical:Vcalendar>



and now in "the second basic abbreviation syntax"
(REC-rdf-syntax 2.2.2):

<ical:Vcalendar>
  <ical:vevent>
    <ical:Vevent>
      <ical:uid>e098h99@washingtonpost.com</ical:uid>
      <ski:euid>kj08988b@nationalchamberorch.org</ski:euid>
      <ical:categories>music</ical:categories>
      <ical:categories>concert</ical:categories>
      <ical:title>Messiah</ical:title>
      <ical:dtstart>19991217T200000</ical:dtstart>
      <ical:rrule ical:freq="DAILY" ical:interval="1" ical:count="2"/>
      <ski:persons ski:diprole="conductor" rdf:value="Takao Kanayama"/>
      <ski:price ski:label="Far side" rdf:value="17USD"/>
      <ski:admission ski:qualtype="AGE" ski:qualrule="REQUIRED"
ski:qualvalue="gt 5" rdf:value=""/>
    </ical:Vevent>
  </ical:vevent>
</ical:Vcalendar>

... with appropriate trimming:

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:ical="http://www.ietf.org/rfc/rfc2445.txt#"
	 xmlns:ski="http://www.skical.org/">
<ical:Vcalendar>
  <ical:vevent>
    <ical:Vevent>
      <ical:uid>e098h99@washingtonpost.com</ical:uid>
      <ski:euid>kj08988b@nationalchamberorch.org</ski:euid>
      <ical:categories>music</ical:categories>
      <ical:categories>concert</ical:categories>
      <ical:title>Messiah</ical:title>
      <ical:dtstart>19991217T200000</ical:dtstart>
      <ical:rrule ical:freq="DAILY" ical:interval="1" ical:count="2"/>
      <ski:persons ski:diprole="conductor" rdf:value="Takao Kanayama"/>
      <ski:price ski:label="Far side" rdf:value="17USD"/>
      <ski:admission ski:qualtype="AGE" ski:qualrule="REQUIRED"
ski:qualvalue="gt 5" rdf:value=""/>
    </ical:Vevent>
  </ical:vevent>
</ical:Vcalendar>
</rdf:RDF>

With everything expressed as arguments:

<ical:Vcalendar>
  <ical:vevent>
    <ical:Vevent>
      <ical:uid rdf:value="e098h99@washingtonpost.com"/>
      <ski:euid rdf:value="kj08988b@nationalchamberorch.org"/>
      <ical:categories rdf:value="music"/>
      <ical:categories rdf:value="concert"/>
      <ical:title rdf="Messiah"/>
      <ical:dtstart rdf:value="19991217T200000"/>
      <ical:rrule ical:freq="DAILY" ical:interval="1" ical:count="2"/>
      <ski:persons ski:diprole="conductor" rdf:value="Takao Kanayama"/>
      <ski:price ski:label="Far side" rdf:value="17USD"/>
      <ski:admission ski:qualtype="AGE" ski:qualrule="REQUIRED"
ski:qualvalue="gt 5" rdf:value=""/>
    </ical:Vevent>
  </ical:vevent>
</ical:Vcalendar>

All that without ever changing the structure.

As Tim wrote, one can continue the move to RDF which will make relationships
clearer
For example:

EUID is the URI which describes the VEVENT globally.  We can make it clear
that this is the resource which all properties are describing



(UID, on the other hand represents the local statements which are being
made.

this is not a shoe-in to do this in RDF, we would have to create a "bag of
statements"
which would receive the UID attribute. Maybe it would be more pragmatic to
make UID a parameter to VEVENT and leave the semantics up to the application


#0 --rdf:type--> ical:Vcalendar
#0 --ical:vevent--> kj08988b@nationalchamberorch.org
kj08988b@nationalchamberorch.org --rdf:type--> ski:Euid
kj08988b@nationalchamberorch.org --ical:categories--> 'music'
kj08988b@nationalchamberorch.org --ical:categories--> 'concert'
kj08988b@nationalchamberorch.org --ical:title--> 'Messiah'
kj08988b@nationalchamberorch.org --ical:dtstart--> '19991217T200000'
kj08988b@nationalchamberorch.org --ical:rrule--> #1
#1 --rdf:type--> ical:Rrule
#1 --ical:freq--> 'DAILY'
#1 --ical:interval--> '1'
#1 --ical:count--> '2'
kj08988b@nationalchamberorch.org --ski:persons--> #2
#2 --rdf:type--> ski:Persons
#2 --ski:diprole--> 'conductor'
#2 --rdf:value--> 'Takao Kanayama'
kj08988b@nationalchamberorch.org --ski:price--> #3
#3 --rdf:type--> ski:Price
#3 --ski:label--> 'Far side'
#3 --rdf:value--> '17USD'
kj08988b@nationalchamberorch.org --ski:admission--> #4
#4 --rdf:type--> ski:Admission
#4 --ski:qualtype--> 'AGE'
#4 --ski:qualrule--> 'REQUIRED'
#4 --ski:qualvalue--> 'gt 5'
#4 --rdf:value--> ''

<ical:Vcalendar>
  <ical:vevent>
    <ski:Euid rdf:about="kj08988b@nationalchamberorch.org">
      <ical:uid rdf:value="e098h99@washingtonpost.com"/>
      <ical:categories rdf:value="music"/>
      <ical:categories rdf:value="concert"/>
      <ical:title rdf="Messiah"/>
      <ical:dtstart rdf:value="19991217T200000"/>
      <ical:rrule ical:freq="DAILY" ical:interval="1" ical:count="2"/>
      <ski:persons ski:diprole="conductor" rdf:value="Takao Kanayama"/>
      <ski:price ski:label="Far side" rdf:value="17USD"/>
      <ski:admission ski:qualtype="AGE" ski:qualrule="REQUIRED"
ski:qualvalue="gt 5" rdf:value=""/>
    </ski:Euid>
  </ical:vevent>
</ical:Vcalendar>


The next step is to create an XML DTD - and you will be doing that for XML
and RDF at the same time.

The important thing as I see it is that there is a tie-in to the RDF
triples.  Changing the syntax is not a cardinal sin, but is it worth it?
Like this for example:



<ical:Vcalendar>
  <ical:vevent ski:Euid="kj08988b@nationalchamberorch.org">
    <ical:uid rdf:value="e098h99@washingtonpost.com"/>
    <ical:categories rdf:value="music"/>
    <ical:categories rdf:value="concert"/>
    <ical:title rdf="Messiah"/>
    <ical:dtstart rdf:value="19991217T200000"/>
    <ical:rrule ical:freq="DAILY" ical:interval="1" ical:count="2"/>
    <ski:persons ski:diprole="conductor" rdf:value="Takao Kanayama"/>
    <ski:price ski:label="Far side" rdf:value="17USD"/>
    <ski:admission ski:qualtype="AGE" ski:qualrule="REQUIRED"
ski:qualvalue="gt 5" rdf:value=""/>
  </ical:vevent>
</ical:Vcalendar>


In Greg's tutorials for SKiCal-XML he likes to do things like this:

WHICH
        WHEN
                WHERE
                        WHAT1
                                WHOW1
                WHERE
                        WHAT2
                                WHOW2


But this is not compatible with the current versions of neither iCal or
SKiCal, But even this can easily be represented with RDF though I can
imagine that a flatter structure which would leave the hierarchy up to the
application would be superior






--
 / Jonas Liljegren  <jonas@rit.se>


>
> >Tim wrote:
> >Conclusion: very appropriate to map to RDF: a shoe-in. This
> would release a
> >few tensions/ambiguities in iCaldendar as is, too, and remove much
> >unnecessary extension stuff from the spec.
> >
> >Greg:
> >I don't think shoe-in is exactly the right word for it.  I have been
> hanging
> >around on RDF lists for over a year now and I think it would be pretty
> >adventurous  to take iCal, which is already used in quite a few
> applicatins
> >into that fray
>
> Once one has a mapping between something like iCalendar and RDF, and some
> sofware to go at least one way, then you don't have to take
> anyone into any
> "fray", One could  just suck up iCal stuff and analyse with with RDF tools
> etc.
>
> The interesting exercise is to check the extent to which an application
> which has been designed without RDF in mind naturally falls into an RDF
> model.
>
> Tim
>
Received on Tuesday, 22 February 2000 10:45:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:42 GMT