<!DOCTYPE gcapaper PUBLIC "-//GCA//DTD GCAPAP-X DTD 20020220 Vers 6.1//EN" "http://swordfish.rdfweb.org/people/libby/rdfweb/skical/gcapaper.dtd">
<gcapaper>
  <front>
    <title>SkiCal and iCalendar in DAML+oil: a case study</title>
    <keyword>SkiCal</keyword>
    <keyword>iCalendar</keyword>
    <keyword>RDF</keyword>
    <keyword>DAML+oil</keyword>
    <keyword>ontology</keyword>
    <keyword>schema</keyword>

    <author>
      <fname>Libby</fname>
      <surname>Miller</surname>
      <address>
	<affil>ILRT (University of Bristol)</affil>
	<city>Bristol</city>
	<country>United Kingdom</country>
	<email>libby.miller@bristol.ac.uk</email>
	<web>http://ilrt.org/</web>
      </address>
      <bio>
	<para>Libby Miller is an RDF hacker interested in calendaring and
	querying.</para>
      </bio>
    </author>


    
    <author>
      <fname>Greg</fname>
      <surname>FitzPatrick</surname>
      <address>
	<affil>SkiCal Consortium</affil>
	<city>Stockholm</city>
	<country>Sweden</country>
	<email>greg@skical.org</email>
	<web>http://www.skical.org</web>
      </address>
      <bio>
	<para>
A computer veteran of 25 years, Greg FitzPatrick does research in the
evolvement of end-to-end markets and super directories. He is an adviser
to the Swedish government's Information Technology Commission, a
contributing author to the Swedish Governmental Enquiry on Infrastructure,
an adviser to the National Education Agency and the Swedish National
Tourist Council. He is the initiator and coauthor of the SkiCal directory
markup language.	
        </para>
      </bio>
    </author>


    <abstract>
      <para>
DAML+oil is a language for describing ontologies, building
on RDF Schema and XML Schema. It can be used to describe types of objects
and the kinds of relationships expected between them. It uses references
to XML Schema datatypes to describe integers, dates and other datatypes.
      </para> 
      <para>
This paper is the result of an attempt to describe the SkiCal and
iCalendar data formats using DAML+oil. The iCalendar mime-directory
standard is a format for describing events, to-do lists and journals,
including associated date-formats, time zones, and alarms. It is used in
the calendaring and scheduling applications of most major desktop and PDA
personal information managers. SkiCal is an extension to iCalendar which
describes public
events such as concerts, sports competitions and conferences. Both formats
are established, document-based formats for describing objects including
times, dates, people, events, locations and prices. 
      </para> 
      <para> 
We wanted to see whether it was possible to describe SkiCal and iCalendar
using DAML+oil, and whether it would be useful to do so. This paper
describes some uses of DAML+oil using parts of SkiCal and iCalendar as
examples, and examines some of the benefits and problems of using DAML+oil
to describe an existing data format or schema.
      </para>
    </abstract>
  </front>

 <body>
    <section id="intro">
      <title>Introduction</title>
      <para>
DAML+oil based on and uses the RDF Model and Syntax <bibref
refloc="RDFMS" />, and extends the RDF Schema <bibref refloc="RDFS" />. It
allows you to describe types of objects and the relationships you expect
to hold between them. It is a schema language, describing constraints you
wish to hold within your instance data. 
      </para>
      <para>
RDF Schema provides a rather minimalistic basis for RDF vocabulary
description, allowing one to describe nodes as being instances of classes
which can be hierarchically organised. It also allows the description of
properties hierarchically, and enables one to restrict the
types of nodes which can be used at either end of arcs. DAML+oil adds to
these restrictions, making for a more powerful and descriptive language
for describing the way in which objects in the world relate to one
another.
      </para>
      <para>
DAML+oil represents a large increase in both in complexity and power over
RDF Schema. We were interested in seeing whether the increase in power was
sufficiently useful to make up for the increase in complexity. We felt
that a good way to do this was to try to describe a data format that was
in current use, rather than building a DAML+oil ontology from scratch for
the purposes of demonstration.
      </para>
      <para>
The structure of the paper is as follows. In section 1, we provide
high-level description of the RDF information model which underpins
DAML+oil, the
relationship between RDF and XML, and the purpose of RDF Schema and
related technologies. In section 2 we describe the SkiCal and iCalendar
data formats. Section 3 describes some of the reasons we wanted to
describe iCalendar and SkiCal in RDF, including namespace-mixing and
datatyping. Section 4 sets out three practical uses of DAML+oil for
iCalendar and SkiCal, and finally, section 5 outlines some difficulties
with using DAML+oil for these data formats.
      </para>
    </section>

    <section id="rdf">
      <title>1: RDF, XML and DAML+oil</title>
      <para>
The W3C's Resource Description Framework (RDF) provides a simple
graph-based information model for Web applications that need to exchange
data in a flexible yet predictable way. Since RDF data is typically
encoded and exchanged using XML documents, RDF in effect provides a set of
restrictions or design conventions for well-formed XML documents. 
      </para>
      <para>
XML provides use with the notion of both well-formed and valid documents.
A valid document conforms to some specific DTD (or schema), whereas a
merely 'well-formed' document is constrained only to have the basic
elements,
attributes and content structure shared by all XML documents. RDF can be
thought of as an attempt to find a middle ground between the strict notion
of 'conformance to a named schema' and the much weaker 'unconstrained tag
soup'. A well-formed XML document that is written in conformance with the
RDF syntax is understood to encode an edge-labelled directed graph, whose
nodes and edges may be labelled with Web resource identifiers (URIs). 
      </para>
      <para>
RDF is particularly suited for the deployment of XML in the World Wide
Web, since the distributed nature of the Web often requires us to mix
information from multiple sources and applications within a single
document. While the notion of 'wellformedeness' and XML Namespaces
mechanism provides the basic infrastructure for mixed-namespace XML
markup, RDF supplies a much needed set of constraints and conventions for
using these. RDF can be thought of as offering 'design patterns' for
creators of mixed-namespace documents. By writing mixed-namespace XML in
the style specified by the RDF Syntax recommendation, we reduce some of
the unpredictability and variation associated with the unconstrained use
of well-formed XML. 
      </para>
      <para>
As a graph structure, RDF is useful even without knowledge of the specific
vocabularies used. While these vocabularies (as documented in RDF schemas
associated with namespaces) can provide useful meta-information to
support more sophisticated applications, RDF was designed to be useful in
the absence of schema information. 
      </para>
      <para>
If we can use RDF query, storage and API without need for RDF schemas,
what use is RDF schema? And what use might we make of more sophisticated
extensions to RDF schema such as DAML+OIL or W3C's new Web Ontology
language? 
      </para>
      <para>
The RDF information model essentially consists of nodes and arcs
(resources and properties), but RDF additionally makes the stronger claim
that these graph data structures are not arbitrary computational
constructs, but encodings of claims about the world. An RDF document is
the kind of
thing that (in some context) can be true or false. When dealing with RDF,
as a consequence of this, we often deal with two parallel sets of
terminology. Considered as a graph data structure, we talk of 'nodes and
arcs' (or edges); considered as a representational formalism that makes
claims about the world, we talk of 'classes' of 'resource' and their
'properties'. When we hear that RDF is supposed to be 'semantic', or
'meaningful', it is related to this second set of terminology, and to the
goal that RDF documents should be considered as 'saying things about the
world'. 
      </para>
      <para>
RDF Schema provides the first steps to modelling these claims about the
world in RDF, by allowing the definition of hierarchies of classes of
objects and properties, and be enabling you to describe constraints on
where properties can be used. DAML+oil provides a larger set of modelling
concepts for describing the world, including 
      </para>
      
      <randlist style="simple">
        <li>
	<para>
	class hierarchies and relationships
	</para>
	</li>
	<li>
	<para>
	property hierarchies and relationships
	</para>
	</li>
	<li>
	<para>
	the cardinality of properties
	</para>
	</li>
	<li>
	<para>
	restrictions on which property can be used where
	</para>
	</li>
	<li>	
	<para>
	datatype objects 
	</para>
	</li>
	<li>
	<para>
	instance data
	</para>
	</li>
      </randlist>

      <para>
The important difference between XML Schema and DAML+oil (which may appear
to have overlapping functionality) is that an XML Schema defines a class
of XML documents by describing syntactic constraints on those documents,
while DAML+oil (like RDF Schema) is data-orientated, describing
constraints on objects, not on documents. DAML+oil and RDF Schema are
therefore particularly useful for describing relationships between objects
which are described over several different documents, including
relationships between schemas or ontologies.
      </para>
    </section>
    <section id="skical">
      <title>2. The SkiCal and iCalendar data formats</title>
      <para>
The iCalendar mime-directory standard is a format for describing
events, to-do lists and journals, including associated date-formats,
time zones, and alarms. It is used in most major desktop and PDA
Calendaring and Scheduling applications.
      </para>
      <para>
Here is an example event described in iCalendar, taken from RFC 2445
<bibref refloc="ICAL" />
      </para>
	<code.block>
     BEGIN:VCALENDAR
     VERSION:2.0
     PRODID:-//hacksw/handcal//NONSGML v1.0//EN
     BEGIN:VEVENT
     DTSTART:19970714T170000Z
     DTEND:19970715T035959Z
     SUMMARY:Bastille Day Party
     END:VEVENT
     END:VCALENDAR
	</code.block>
      <para>
This fragment describes an event - a Bastille Day party - starting at 5pm
UTC on 14th July 1997 and ending the following day at 3.59am.
      </para>
      <para>
SkiCal is an extension to iCalendar for describing public events,
like concerts, sports events and conferences. The core technology of
SkiCal is the 'WHA-machine'; the structuring of information based on the
six common interrogatives; WHAT, WHEN, WHERE, WHOW, WHY, and WHO.
      </para>
      <para>
Here is a SkiCal event taken from SkiCal Internet Draft <bibref
refloc="SKICAL" />
(shortened)
      </para>
	<code.block>
BEGIN:VCALENDAR
   VERSION:2.0
   SKICALVER:1.0
   PRODID:-//HandGenerated/SkiCal//NONSGML v1.0//EN
   BEGIN:VEVENT  
   SKUID:kj08988b@nationalchamberorch.org
   SUMMARY:Handel's "Messiah" featuring the National Chamber Orchestra
   TITLE:Messiah
   DTSTART:19991217T200000
   DTEND:19991217T220000
   VENUE:Indoors
   PERSONS;SKiROLE="conductor":Takao Kanayama
   PERSONS;SKiROLE="orchestra":National Chamber Orchestra
   PERSONS;SKiROLE="creator":G.F.Handel
   PRICE;PRXITEM="SFT:Far side";CURRENCY=USD:17
   END:VEVENT  
END:VCALENDAR
	</code.block>
      <para>
This describes an event with an identifier, a title, and a start and an 
end time, but also information about the price of the event and the people
involved and their roles.
      </para>
      <para>
Both SkiCal and iCalendar are designed for the machine interchange of
event data, including storage and scheduling applications. They are both
modelled using objects, properties and datatypes. They use a syntactic
structure called mime-directory, as defined in RFC 2425 <bibref
refloc="MIME" />, which is
also used for VCARD <bibref refloc="VCARD" />. Ordering of properties and
values within the
main container constructs is not important. There are some cardinality
constraints over certain properties and their values, and in some places,
implicit class hierarchies between the objects.
      </para>
    </section>

    <section id="advantages">
      <title>Advantages of describing iCalendar and SkiCal in 
DAML+oil</title>
      <para>
Both iCalendar and SkiCal are good candidates to mark up in RDF: they
describe objects, such as times, dates, events, people, places; and their
properties, so that the structure is similar to the RDF information model.
The major advantage of marking up these formats in RDF is the utility of
being able to combine event information with other kinds of information
about people, documents, webpages, geographical locations, and so on.
	</para>

	<subsec1>
	<title>Namespace mixing</title>

         <para>
An example of where namespace mixing can be useful is when
describing objects representing aspects of people in different
circumstances. ICalendar has a business meeting orientation, and
is therefore only concerned with people in their role as calendar users,
namely as the initiators and attendees for meetings. SkiCal goes further
by defining an explicit Persons property, which enables one to talk about
the roles the person might take within an event, such as conductor, guide,
manager. SkiCal also allows one to refer to a URL where the user can find
more information about the person if they wish.
        </para>
        <para>
SkiCal and iCalendar data described in RDF could go further than this,
enabling information from several namespaces to be combined, instead of
constraining a person to be an organiser or providing information at the
end of a URL. For example, event information could be combined with a
Vcard <bibref refloc="VCARD" /> or 'friend-of-a-friend' <bibref
refloc="FOAF" /> vocabulary
to provide more
detailed contact information for the person who might be an organiser of a
meeting or speaker at a conference. Connecting a well-known vocabulary
such as Dublin Core <bibref refloc="DC" /> to event data would enable the
organiser of a meeting to specify reading material for a meeting. 
        </para>
        <para>
Connections to other vocabularies could be described by encoding iCalendar
and SkiCal data in RDF using RDF Schema, or simply by mixing the
namespaces within RDF instance data. However, DAML+oil can be used to
describe these connections with more flexibility and also more
precision, for example by specifying how many of a certain property may be
used with a particular type of object, or by creating constraints on the
type of object linked to by a particular property from a certain object
see below). The relationships between objects can be very complex and
highly structured, and aim to represent (some of) the complexity of
relationships in the world, for example, a father is a parent who is also
a male person; a manager_678 is a person working for company X with Y
years of experience.
         </para>
	</subsec1>
        <subsec1>
          <title>Datatypes</title>                
          <para>
Distinguishing between different forms of data - integers, text,
date-times and floats is very important for indexing and querying,
especially with respect to dates and times. The RDF Core working group is
in the process of defining  a model and syntax for datatypes in RDF;
DAML+oil can be used with XML Schema datatypes.
          </para>
        </subsec1>

       </section>

    <section id="practical">
      <title>4. Three practical uses of DAML+oil in SkiCal for
iCalendar</title>                
      <para>
This section describes some useful aspects of DAML+oil with examples
drawn from the iCalendar and SkiCal draft DAML+oil ontologies
<bibref refloc="ICAL-DAML" />, <bibref refloc="SKICAL-DAML" />. SkiCal and
iCalendar are lengthy and complex
and so here we pick out three of the more interesting and functional uses
of DAML+oil for these calendar ontologies.
      </para>

      <subsec1>
	<title>Assigning identifiers to objects</title>

	<para>
In RDF, objects may have globally unique identifiers (URIs) or be ‘blank
nodes’. Blank nodes are nodes for which there is no appropriate or known
identifier for the object. This may occur when an object does not
naturally fall into the class of things which themselves have identifiers,
such as people. When there is no unique identifier for an object it is
often helpful to be able to say that if an object has a certain property,
then that property and value together uniquely identify the
object. 
	</para>
	<para>
DAML+oil has a way of saying this. If we state that
	</para>
	<code.block><![CDATA[

<daml:ObjectProperty rdf:about="#SKUID">
<rdf:type
rdf:resource="http://www.daml.org/2001/03/daml+oil#UnambiguousProperty"/>
</daml:ObjectProperty>

	]]></code.block>
	<para>
Then this means that two objects with the same value of a SKUID property
are in fact the same object. For example:
	</para>
	<code.block><![CDATA[
<VEVENT>
	<SKUID>kj08988b@nationalchamberorch.org</SKUID>
	<DESCRIPTION>
   	Handel's "Messiah" featuring the National Chamber Orchestra
	</DESCRIPTION>
</VEVENT>

<VEVENT>
	<SKUID>kj08988b@nationalchamberorch.org</SKUID>
	<SUMMARY>
   	The first performance of Handel's "Messiah" by the National
Chamber Orchestra for 20 years.
	</SUMMARY>
</VEVENT>

<VEVENT>
	<SKUID>kj08988b@nationalchamberorch.org</SKUID>
	<DTSTART>19991217T200000</DSTART>
</VEVENT>

	]]></code.block>
	<para>
all these property-value pairs are properties of the same VEVENT
object.
	</para>
	<para>
A nice example of this is for people, as described in <bibref
refloc="SMUSH" />. People
do not have identifiers like webpages do, but they do have personal email
boxes, which at any given time are in the ownership of one person. Email
addresses also have the advantage that they are fairly well-known
strings. If we designate CAL-ADDRESS in iCalendar as a
daml:UnambiguousProperty which points to an email address, then we can
say that if we find the following information:
	</para>
	<code.block><![CDATA[

<wn:Person>
	<CAL-ADDRESS rdf:resource="mailto:libby.miller@bristol.ac.uk" />
	<foaf:name>Libby Miller</foaf:name>
</wn:Person>

<wn:Person>
	<CAL-ADDRESS rdf:resource="mailto:libby.miller@bristol.ac.uk" />
	<foaf:name>Elizabeth Miller</foaf:name>
</wn:Person>

	]]></code.block>
	<para>
we can tell that the person with email address libby.miller@bristol.ac.uk
has two names, Libby Miller and Elizabeth Miller. daml:UnambiguousProperty
is much like the subject indicator construct in topic maps <bibref
refloc="TOPIC" />, which
allows for aggregation of topics.
	</para>
	<para>
Where there is no global identifier for an object, the use of
daml:UnambiguousProperty creates a key which identifies the object.
Often it does not make sense to assign a URI to an event or a person - and
in fact would be a modelling error to use the webpages of an event or the
email address of a person as a surrogate for such an identifier, but 
daml:UniqueProperty can be used as such a surrogate. This still allows
that the same event could have two identifiers, but it does mean that if
we discover two instances of the same value with this property, then
they refer to the same subject.
	</para>
	<para>
From a practical point of view, a piece of software that has had
information about daml:UnambigousProperty programmed into it, can use the
values of properties defined in this way in a schema as keys into the
database for instance data. This makes for effective indexing, storage and
retrieval of instance data in a schema- and daml:UnambigousProperty-aware
database. In particular, it can aid with query processing for fast
retrieval of information. A property which is known to be a
daml:UnambiguousProperty can only retrieve one instance of its subject,
and can therefore prune the search space substantially.
	</para>
	</subsec1>
	<subsec1>
	<title>Combining namespaces</title>

	<para>
RDF Schema allows you to combine objects from the same or different
namespaces using the subclassOf and subPropertyOf constraints:
	</para>
	<code.block><![CDATA[
<rdf:Property rdf:about="http://example.com/skical/schema#SKUID">
<rdfs:subPropertyOf rdf:resource="http://example.com/ical/schema#UID">
</rdf:Property>

<rdfs:Class rdf:about="http://example.com/skical/schema#PERSON">
<rdfs:subClassOf rdf:resource="http://xmlns.com/wn/1.6/Person"/>
</rdfs:Class>
	]]></code.block>

	<para>
and also domain and range constraints on properties:
	</para>
	<code.block><![CDATA[

<rdf:Property rdf:about="http://example.com/skical/schema#COMPONENT">
<rdfs:domain rdf:resource="http://example.com/skical/schema#VCALENDAR" />
<rdfs:resource
rdf:resource="http://example.com/skical/schema#CAL-COMPONENT" />
</rdf:Property>

	]]></code.block>
	<para>
DAML has a number of useful constructs that allow the linking of classes
and properties together directly, by stating that they are different
names for the same thing. Example of these are
daml:samePropertyAs/equivalentTo, daml:inverseOf and daml:sameClassAs.
	</para>
	<para>
These can be useful for creating hooks into existing ontologies or
schemas without rewriting all the instance data.
	</para>
	<para>
Suppose we have three ontologies, one describing organisational structure,
one publications and another company meetings.
Instead of rewriting all the instance data conforming to these ontologies
so that it all uses the same definition of a Person from a single
ontology, one could simply define the different definitions of Person as
the same class as each other using daml:sameClassAs. Depending on how the
data is stored this could be a very useful shortcut.
	</para>
	<para>
DAML+oil also allows the expression of domain, range and subclass and
subproperty relationships with more subtlety and in more detail than in
RDF Schema. In DAML+oil it is possible to say more about the sort of
calendar users expected in iCalendar, which might affect the sorts of
transactions expected by a scheduling program:
	</para>
	<code.block><![CDATA[

<rdfs:Class rdf:about="http://example.com/ical/schema#CAL-USER">
  <rdfs:comment>every calendar user is a person or a
robot</rdfs:comment>
  <daml:disjointUnionOf rdf:parseType="daml:collection">
    <daml:Class rdf:about="http://xmlns.com/wn/1.6/Person"/>
    <daml:Class rdf:about="http://xmlns.com/wn/1.6/Robot"/>
  </daml:disjointUnionOf>
</rdfs:Class>

	]]></code.block>
	<para>
Another example: instead of saying that the range of a property COMPONENT
must _always_ have value CALCOMPONENT, we can state this restriction just
for a particular class of objects, e.g. for VCALENDAR objects:
	</para>
	<code.block><![CDATA[

<rdfs:Class rdf:about="#VCALENDAR">
  <rdfs:comment>A container for calendar components
  </rdfs:comment>

  <rdfs:subClassOf>
    <daml:Restriction daml:minCardinality="1">
      <daml:onProperty rdf:resource="#COMPONENT"/>
      <daml:toClass rdf:resource="#CALCOMPONENT"/>
    </daml:Restriction>
  </rdfs:subClassOf>

</rdfs:Class>

	]]></code.block>
	<para>
- in this case also adding the restriction that there be at least one of
the property COMPONENT.
	</para>
	<para>

This restriction to a local range means that we can reuse COMPONENT
elsewhere with different restrictions: if we liked we could create an
ical:COMPONENT for CALCOMPONENTS like VEVENTS themselves, perhaps
referring
to subevents of a main containing event. 
	</para>
	<para>

One can take existing ontologies and connect them in minute and precise
detail using daml properties such as daml:disjointWith,
daml:intersectionOf, daml:unionOf, daml:complementOf. ICalendar and SkiCal
are a good example of a pair of ontologies where one depends on terms
defined in another. SkiCal TITLE property has a ical TEXT value; SkiCal
OPTIME has most of the same properties of ical:VEVENT and so we can define
VEVENT and OPTIME as subclasses of a more general class. In principle
DAML+oil can make relationships such as these more precise, but in
practice, at least in this case finding examples of this is hard. It is
relatively straightforward to say that person class is
disjointWith plant class (all plants are not people) or that a father
class represents the intersection of parent class and male things class
(all fathers are both males and parents). But for iCalendar and SkiCal
more vaguely defined relationships seem to be sufficient, and any more
detail is not easily definable.
	</para>
	<para>

In addition, attempting to connect two ontologies with such precision
assumes a degree of information about the intentions of the creator of the
ontologies that is probably unwarranted. Person, father, plant are
comparatively easy to define and understand; time, location, role are less
straightforward. 
	</para>
	<para>

However, if a degree of imprecision is acceptable and still informative,
then simple relationships like daml:sameClassAs can be time-saving and
useful.
	</para>
	</subsec1>

	<subsec1>
	<title>XML datatypes</title>
	<para>
Calendaring and scheduling applications need to be able to do operations
on dates and times, such as:
	</para>
	<randlist>
	<li>
	<para>
'find all the events that the calendar user Libby is attending
within the next week'
	</para>
	</li>
	<li>
	<para>
'find all the events that calendar users Greg and Dan are both attending
between June 21st 2002 and August 16th 2003'
	</para>
	</li>
	<li>
	<para>
'find every time period that Damian is free between 8.30am and 7.00pm GMT
today'
	</para>
	</li>
	</randlist>
	<para>
To display calendar information or schedule events, applications need to
be able to makes these types of queries of a source of data, and that
requires knowing that certain objects are the sorts of things that one can
perform a 'greater than', 'less than' or 'between' operation on.
Datatyping can also enable or increase the speed of indexing in databases
(for example in several relational databases, datatyping is the only way
that these types of queries about dates can be performed).
	</para>
	<para>
The RDFCore group is currently finalising a model for expressing
datatypes. DAML+oil has its own methods of using datatypes. It has certain
syntactic structures which point to XML Schema datatypes, both at the
schema and the instance level.
	</para>
	<para>
For example, defining iCalendar in DAML+oil, one could say:
	</para>
	<code.block><![CDATA[

<daml:DatatypeProperty rdf:ID="DTSTART">
<rdfs:range rdf:resource="http://www.w3.org/2000/10/XMLSchema#dateTime"/>
</daml:DatatypeProperty>

	]]></code.block>
	<para>
In which case sample instance data could look like this:
	</para>
	<code.block><![CDATA[

<VEVENT>
	<DTSTART>2002-03-15T15:00Z</DTSTART>
</VEVENT>

	]]></code.block>
	<para>
and a DAML+oil processor could determine using the schema that the string
2002-03-15T15:00Z represented a XML Schema datatype, and index it
accordingly.
	</para>
	<para>
Unfortunately the syntactic description of a date-time in iCalendar is not
an identical subset of ISO 8601 to that used by XML Schema datatypes, and
so translating iCalendar correctly to DAML+oil would involve creating a
new datatype. This can be achieved by creating an XML Schema file with the
correct restrictions and pointing to the datatypes in that.
	</para>
	<para>
One distinction that we found difficult to draw clearly at times was
between what might be termed the 'default' datatypes of RDF and the XML
Schema datatypes. Although RDF does not yet have its own datatypes, nodes
must either be Literals or Resources. In some cases it is not clear
whether to say something is a XML Schema datatype or an RDF resource or
literal: for example do you say
	</para>
	<para>
ical:DESCRIPTION is a daml:DatatypeProperty with a xsd:String value, or
	</para>
	<para>
ical:DESCRIPTION is a daml:ObjectProperty with a rdf:Literal value
	</para>
	<para>
similarly, is it:
	</para>
	<para>
ical:URI is a daml:DatatypeProperty value xsd:anyURI, or
	</para>
	<para>
ical:URI is a daml:ObjectProperty value rdf:Resource?
	</para>
	<para>
DAML+oil makes a distinction between properties pointing to DAML+oil
objects and properties pointing to datatypes (which are always XML Schema
datatypes). These value spaces are disjoint, but there is an apparent
overlap, as described above.
	</para>
	<para>
In many cases however, XML Schema datatypes are a useful and also
extensible mechanism for datatypes. In SkiCal information about age
restrictions are currently described in structured text, but
we could define an extension to SkiCal specifically for movies
and define our own XML Schema datatypes for the categories of age group
used:
	</para>
	<para>
(example adapted from the DAML+oil walkthrough <bibref refloc="DAML-WALK" />)
	</para>
	<code.block><![CDATA[
<xsd:schema xmlns:xsd ="http://www.w3.org/2000/10/XMLSchema#">

<xsd:simpleType name="under18">
  <!-- under18 is an XMLS datatype based on decimal -->
  <!-- with the added restriction that values must be >= 17 -->
  <xsd:restriction base="xsd:decimal">
  <xsd:minInclusive value="17"/>
  </xsd:restriction>
</xsd:simpleType>

</xsd:schema>
	]]></code.block>
	<para>

and then point at this in the SkiCal extension like this:

(schema)
	</para>
	<code.block><![CDATA[

<rdfs:Class rdf:about="Minor">
  <daml:intersectionOf rdf:parseType="daml:collection">
    <daml:Class rdf:about="#Person"/>
    <daml:Restriction>
      <daml:onProperty rdf:resource="http://xmlns.com/foaf/0.1/age"/>
      <daml:hasClass
rdf:resource="http://example.com/xmlschemas/cinema#under18"/>
    </daml:Restriction>
  </daml:intersectionOf>
</rdfs:Class>

	]]></code.block>
	<para>

(instance data)
	</para>
	<code.block><![CDATA[

<ical:VEVENT>
   <ski:TITLE>Texas Chain Saw Massacre, The</ski:TITLE>
   <mdb:UKCertification>18</mdb:UKCertification>
   <ski:PROHIBITED>
	<ski:Minor />
   </ski:PROHIBITED>
</ical:VEVENT>

      ]]></code.block>
    </subsec1>
    </section>

    <section id="problems">
      <title>Problems with DAML+oil</title>                
      <para>
The authors found the process of creating DAML+oil schemas for iCalendar
and SkiCal difficult and slow. Part of this difficulty came from
translating between schema specification languages. Such a translation
requires a very good understanding of the schema to be translated, and in
most schema languages, it is not possible to capture exactly what the
intention of the authors was at the time of writing. 
      </para>
      <para>
Another significant problem was the awkward syntax and limited
expressivity of the DAML+oil language. The syntactic difficulties are
mainly due to the problem inherent in expressing complex constraints
within the binary RDF model. The problems with expressivity are because
DAML+oil is a language designed to harness the tractability of a certain
class of Description
Logics (themselves a subset of first Order logic). This makes for a very
constrained functionality that can be puzzling and frustrating to use. A
short position paper by Pat Hayes [HAYES] explains this difficulty very
clearly. 
      </para>
      <para>
Our experience suggests that there will only be limited benefits to most
users of defining very precise relationships between objects using
DAML+oil, because of the high cost of doing so, both in terms of the time
and effort expended, and the high potential of error.
      </para>
      <para>
Where DAML+oil is used to describe relations between objects in ontologies
written by different authors, connecting the ontologies involves
hypothesising what the author meant by the ontology. A machine readable
DAML+oil ontology does not capture all the aspects of the world in the
area which it claims to represent, and so there is immense potential for
error, still more so when the ontologies are defined in RDF Schema or Mime
directories or other means less precise than DAML+oil. 
      </para>
      <para>
Even within a single ontology, the degree of precision that DAML+oil
enables you to describe between objects is in many cases greater than the
degree of precision that you know pertains in those particular
circumstances. This means that arbitrary decisions are made for those
descriptions, leading to errors of interpretation, and, paradoxically, a
reduction in precision, because of the introduction of this random noise.
      </para>
      <para>
However, as we have shown, a subset of DAML+oil can be very useful indeed,
with practical benefits for indexing RDF information for storage and
querying, for querying and storing datatypes, and for creating approximate
links between schemas or ontologies.
      </para>
     </section>
   </body>

<rear>
<acknowl>
<para>Thanks to Dan Brickley</para>
</acknowl>

<bibliog>
<bibitem id="ICAL">
<bib>ICAL</bib>
<pub>
Internet Calendaring and Scheduling Core Object Specification 
(iCalendar)
Network Working Group        
November 1998
Request for Comments: 2445                                      
Category: Standards Track   
F. Dawson, D. Stenerson
http://www.imc.org/rfc2445
</pub>
</bibitem>

<bibitem id="SKICAL">
<bib>SKICAL</bib>
<pub>
SkiCal Internet Draft
Network Working Group   
Internet-Draft 
Expires: July 8, 2002 
G. FitzPatrick, P. Lannera, N. Hjelm
http://www.ietf.org/internet-drafts/draft-many-ical-ski-05.txt
</pub>
</bibitem>

<bibitem id="DAML-WALK">
<bib>DAML-WALK</bib>
<pub>
Annotated DAML+OIL (March 2001) Ontology Markup (DAML+oil
walkthru)  
Frank van Harmelen,  Peter F. Patel-Schneider and  Ian Horrocks, editors
(also  Lynn Andrea Stein, Dan Connolly, and Deborah McGuinness, editors of
previous versions)
http://www.daml.org/2001/03/daml+oil-walkthru.html
</pub>
</bibitem>

<bibitem id="DAML-REF">
<bib>DAML-REF</bib>
<pub>
Reference description of the DAML+OIL (March 2001) ontology
markup language
Frank van Harmelen,  Peter F. Patel-Schneider and  Ian Horrocks, editors.
Contributors: Tim Berners-Lee, Dan Brickley, Dan Connolly, Mike Dean,
Stefan Decker, Pat Hayes, Jeff Heflin, Jim Hendler, Ora Lassila, Deb
McGuinness, Lynn Andrea Stein, and others
http://www.daml.org/2001/03/reference.html
</pub>
</bibitem>

<bibitem id="SKI-DAML-NOTES">
<bib>SKI-DAML-NOTES</bib>
<pub>
Notes on defining SkiCal in DAML+oil 
2002-03-22
Libby Miller
http://ilrt.org/discovery/2002/03/skical-daml/skical-daml-diary.txt
</pub>
</bibitem>

<bibitem id="ICAL-DAML">
<bib>ICAL-DAML</bib>
<pub>
Draft iCalendar DAML+oil schema 
2002-03-22
Libby Miller
http://ilrt.org/discovery/2002/03/skical-daml/ical-daml.daml
</pub>
</bibitem>

<bibitem id="SKICAL-DAML">
<bib>SKICAL-DAML</bib>
<pub>
Draft SkiCal DAML+oil schema
2002-03-22
Libby Miller
http://ilrt.org/discovery/2002/03/skical-daml/skical-daml.daml
</pub>
</bibitem>

<bibitem id="XSD-2">
<bib>XSD-2</bib>
<pub>
XML Schema Part 2: Datatypes
W3C Recommendation 02 May 2001
Paul V. Biron, Ashok Malhotra
http://www.w3.org/TR/xmlschema-2/
</pub>
</bibitem>

<bibitem id="XSD-0">
<bib>XSD-0</bib>
<pub>
XML Schema Part 0: Primer
W3C Recommendation, 2 May 2001
David C. Fallside (editor)
http://www.w3.org/TR/xmlschema-0/
</pub>
</bibitem>

<bibitem id="HYBRID">
<bib>HYBRID</bib>
<pub>
Draft Hybrid RDF Calendar Schema
Michael Arick and Libby Miller 
2001-06-18
http://ilrt.org/discovery/2001/06/schemas/ical-full/hybrid.rdf
</pub>
</bibitem>

<bibitem id="RDFS">
<bib>RDFS</bib>
<pub>
RDF Schema Specification 1.0
Dan Brickley and R.V. Guha
W3C Candidate Recommendation 27 March 2000
http://www.w3.org/TR/rdf-schema
</pub>
</bibitem>

<bibitem id="RDFMS"> 
<bib>RDFMS</bib> 
<pub> 
RDF Model and Syntax Specification 
Ora Lassila and Ralph R. Swick 
W3C Recommendation 
22 February 1999
http://www.w3.org/TR/REC-rdf-syntax
</pub> 
</bibitem>

<bibitem id="DC">
<bib>DC</bib>
<pub>
1999-07-02
Dublin Core Metadata Element Set, Version 1.1: Reference Description
http://dublincore.org/documents/dces/
</pub>
</bibitem>

<bibitem id="FOAF">
<bib>FOAF</bib>
<pub>
Friend of a friend RDF vocabulary
Dan Brickley and others
http://xmlns.com/foaf/0.1/
</pub>
</bibitem>

<bibitem id="MIME">
<bib>MIME</bib>
<pub>
Network Working Group                                         
Request for Comments: 2425                                   
Category: Standards Track                
T. Howes, M. Smith, F. Dawson
September 1998
A MIME Content-Type for Directory Information
http://www.imc.org/rfc2425
</pub>
</bibitem>

<bibitem id="VCARD">
<bib>VCARD</bib>
<pub>
Network Working Group                                       
Request for Comments: 2426               
Category: Standards Track                                  
F. Dawson, T. Howes
September 1998
vCard MIME Directory Profile
http://www.imc.org/rfc2426
</pub>
</bibitem>

<bibitem id="TOPIC">
<bib>TOPIC</bib>
<pub>
XML Topic Maps (XTM) 1.0
Editors: Steve Pepper, Graham Moore 
http://www.topicmaps.org/xtm/
</pub>
</bibitem>

<bibitem id="HAYES">
<bib>HAYES</bib>
<pub>
Catching the Dreams
by Pat Hayes
http://www.aifb.uni-karlsruhe.de/~sst/is/WebOntologyLanguage/hayes.htm
</pub>
</bibitem>

<bibitem id="SMUSH">
<bib>SMUSH</bib>
<pub>
RDFWeb notebook: aggregation strategies
Dan Brickley
http://rdfweb.org/2001/01/design/smush.html
</pub>
</bibitem>
</bibliog>
  </rear>

</gcapaper>

