- From: Drew McDermott <drew.mcdermott@yale.edu>
- Date: Fri, 18 May 2001 15:53:14 -0400 (EDT)
- To: www-rdf-logic@w3.org
Following down the pointers provided by Jos de Roo, I am beginning to
understand N3 a lot better --- and RDF a bit worse. The key
innovation of N3 is *contexts*, indicated by braces. To quote from
http://www.w3.org/2000/10/swap/Primer.html ---
Let's call a set of RDF statements a context. In a context,
The statements are all independent, in that you can remove any
of the statements and the rest are still true The order of the
statements does not in fact matter. There is no such thing as
the same statement occuring twice any more than you can be a
person twice.
Sometimes, we need to talk about more than one context. For
example, if either one statement or another is true, then we can't
put them in the same context.
In N3 a context can be represented by enclosing all the statements
it encloses in curly braces { }. (In RDF/XML, contexts are declared
using the bagid attribute on a collection of statements) .
<x.rdf> :says { :pat a :Person . } .
The context in braces acts just like an identifier in the rest of
the syntax. It is like a literal expression in that it is defined
only by its contents. This example just declares that the document
x.rdf expresses the hypothetical context in which it is stated that
pat is a person: the statement above doesn't state that pat is a
person. (There is a problem with the XML serialization of this.)
Later in the primer, we have
A simple rule, then, is,
{ sensor:thermostat math:greaterThan "30" . }
log:implies { control:furnace control:setTo "1" . } .
My question is: when the primer says "There is a problem with the XML
serialization" of contexts, what does it mean? I can think of two
things:
(a) Braces are really just a shorthand for reification. Using braces
more than casually would generate reams of re-re-reifications.
(b) Braces break the rule that a structure of triples implies every
structure in the triple. The XML serialization assumes the rule is true.
Can an expert explain the problem to us? I'm really hoping that it's
(b), because if we can so easily discard the Evil Rule in N3, it
shouldn't be any harder to fix the XML serialization.
Thanks.
-- Drew McDermott
Received on Friday, 18 May 2001 15:53:15 UTC