Re: N3 vs. XML

> Drew McDermott wrote:
> [...]
> > 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?

Hm.  I don't see a real problem.  I think it's just that the
serialization of contexts is big and there wasn't a standard for it.

I fed this
================================================================
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix sensor: <foo:sensor#>.
@prefix math: <foo:math#>.
@prefix control: <foo:control#>.

{ sensor:thermostat  math:greaterThan "30" . }
log:implies { control:furnace control:setTo "1" . } .
================================================================
to my prolog semweb library with: xsb -e "[semweb]. assert_n3(example)."

and got:
================================================================
% Anonymous rule
tproperty('foo:control#furnace','foo:control#setTo','data:,1') :- 
   tproperty('foo:sensor#thermostat','foo:math#greaterThan','data:,30').
================================================================

which seems correct and simple enough to me.   What confusion am I
missing?

Of course, the intermediate serialization of contexts wasn't tiny:
================================================================
property('genid:4','http://www.w3.org/1999/02/22-rdf-syntax-ns#subject','foo:sensor#thermostat').
property('genid:4','http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate','foo:math#greaterThan').
property('genid:4','http://www.w3.org/1999/02/22-rdf-syntax-ns#object','data:,30').
property('genid:5','http://www.daml.org/2001/03/daml+oil#first','genid:4').
property('genid:5','http://www.daml.org/2001/03/daml+oil#rest','http://www.daml.org/2001/03/daml+oil#nil').
property('genid:3','http://www.w3.org/2001/04/18/set#enumeration','genid:5').
property('genid:8','http://www.w3.org/1999/02/22-rdf-syntax-ns#subject','foo:control#furnace').
property('genid:8','http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate','foo:control#setTo').
property('genid:8','http://www.w3.org/1999/02/22-rdf-syntax-ns#object','data:,1').
property('genid:9','http://www.daml.org/2001/03/daml+oil#first','genid:8').
property('genid:9','http://www.daml.org/2001/03/daml+oil#rest','http://www.daml.org/2001/03/daml+oil#nil').
property('genid:7','http://www.w3.org/2001/04/18/set#enumeration','genid:9').
property('genid:3','http://www.w3.org/2000/10/swap/log#implies','genid:7').
================================================================

   -- sandro

Received on Friday, 18 May 2001 18:29:04 UTC