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

Re: Back to basics.

From: Francois-Paul Servant <hypersol@micronet.fr>
Date: Fri, 19 May 2000 00:12:41 +0200
Message-Id: <v04210100b54a14cf58fe@[195.132.167.21]>
To: www-rdf-interest@w3.org
Salutations to all of you,

Hello Gerard - you said :

>I'm trying to put together a RDF "core" system (read, write, store,
>manipulate... just what we all would like to do with it at the most
>abstract level...) and to start I'm looking for a parser.
>I've tried some of them, including an (self-) modified version of SiRPAC
>and I get systematically different results.
>There seem to be trouble with the Bag support among them.

It seems that we are more or less at the same point. No expert of the 
list answered to your "Back to basics" message at this time. Although 
I am very new to RDF, I'll will try, but keep in mind that I am a 
newbye. I hope that someone will correct me if I am wrong.

My first remark : it is not suprising that we have different results, 
as they are just printouts of programs. The question is : are they 
correct results or not - did the different parsers correctly parse 
the graph ? They all could have, just having different printouts. The 
job of the parser is to allow to build a data stucture that a program 
and algorithms will use to do something useful.

At this time, I personaly have only tried RDF Filter, and I don't 
know for the others, but the way it is implemented seems to be very 
powerful : it's "event driven", allowing you to construct the data 
structure (the graph) in the way you want to.

SiRPAC (1.14 and Online) is right in the way it deals with the bag, 
the referent used being "aboutEach", and not "About" : Ora Lassila is 
the (famous !) creator of each page of the bag, not the creator of 
the bag.

I looked at RDF Filter source code, about this problem. It appears 
that it would be possible to  implement the desired behaviour : the 
RDFHandler (the object which has to take appropriate action when 
receiving an "rdf event"), gets an information called "subjectType" 
along with the triple. This information, that is not used in the 
printouts of the TestRDFFilter, is precisly "aboutEach" in our case. 
If we keep everything in memory when parsing the RDF, it should not 
be difficult to get the correct behaviour.

The other difference between RDF Filter and SiRPAC is only about 
resolving or not the relative URI of the bag resource to absolute 
form. The bag resource is identified by the ID "pages", and it is 
included in the document. Its URI, relative to the URL of the 
containing document, is "#pages" - the result of RDF Filter. I don't 
agree with the "pages" (without #) of your modified SiRPAC. SiRPAC 
resolves this relative URL, and therefore gives "url of the 
document#pages". Having the RDFHandler resolve the relative URL to 
absolute is easy (in java : new URL(docURL, relativURLString)).

About the enumeration, you have a question about syntax. I don't know 
the answer, but syntax is not really the question here - what is 
important is to know what the property means ! Nevertheless, as it is 
a property, and as such a resource, it is identified by a URI, and I 
would vote for "...-ns#_1" (something that is defined within the 
document at "http://...-ns").

I hope this helps. Feel free to contact me, I would be happy if we 
can help each other, sharing experiences, as I think that we are more 
or less at the same level. The level of discussion on the list, at 
least since I subscribed, seems to be higher than our current 
preoccupations.

Best regards,

>--- example2.rdf ------
><?xml version="1.0"?>
><RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>     xmlns:DC="http://purl.org/metadata/dublin_core/">
> <Bag ID="pages">
>   <li resource="http://foo.org/foo.html" />
>   <li resource="http://bar.org/bar.html" />
> </Bag>
> <Description aboutEach="#pages">
>   <DC:Creator>Ora Lassila</DC:Creator>
> </Description>
></RDF>
>
>---- SiRPAC Download Version 1.14 ----
>triple("http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
>"file:D:\Program\java\RDF\SiRPAC-1.14\lassila-example-2.rdf.txt#pages",
>"http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag").
>triple("http://www.w3.org/1999/02/22-rdf-syntax-ns_1",
>"file:D:\Program\java\RDF\SiRPAC-1.14\lassila-example-2.rdf.txt#pages",
>"http://foo.org/foo.html").
>triple("http://www.w3.org/1999/02/22-rdf-syntax-ns_2",
>"file:D:\Program\java\RDF\SiRPAC-1.14\lassila-example-2.rdf.txt#pages",
>"http://bar.org/bar.html").
>triple("http://purl.org/metadata/dublin_core/Creator","http://foo.org 
>/foo.html","Ora
>Lassila").
>triple("http://purl.org/metadata/dublin_core/Creator","http://bar.org 
>/bar.html","Ora
>Lassila").
>
>----- Modified Version of SiRPAC ---------
>triple("http://www.w3.org/1999/02/22-rdf-syntax-ns#type","pages",
>"http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag").
>triple("http://www.w3.org/1999/02/22-rdf-syntax-ns_1","pages","http:/ 
>/foo.org/foo.html").
>
>triple("http://www.w3.org/1999/02/22-rdf-syntax-ns_2","pages","http:/ 
>/bar.org/bar.html").
>
>triple("http://purl.org/metadata/dublin_core/Creator","genid1","Ora
>Lassila").
>
>----- RDF FILTER -----
>{http://www.w3.org/1999/02/22-rdf-syntax-ns#type, #pages,
>http://www.w3.org/1999
>/02/22-rdf-syntax-ns#Bag}
>{http://www.w3.org/1999/02/22-rdf-syntax-ns#_1, #pages,
>http://foo.org/foo.html}
>{http://www.w3.org/1999/02/22-rdf-syntax-ns#_2, #pages,
>http://bar.org/bar.html}
>{http://purl.org/metadata/dublin_core/Creator, #pages, "Ora Lassila"
>(lang=null)}
>
>------ SiRPAC OnLine  -------
>triple('http://www.w3.org/1999/02/22-rdf-syntax-ns#type','online#pages',
>
>       'http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag').
>triple('http://www.w3.org/1999/02/22-rdf-syntax-ns#_1','online#pages',
>       'http://foo.org/foo.html').
>triple('http://www.w3.org/1999/02/22-rdf-syntax-ns#_2','online#pages',
>       'http://bar.org/bar.html').
>triple('http://purl.org/metadata/dublin_core/Creator','http://foo.org 
>/foo.html',
>
>       'Ora Lassila').
>triple('http://purl.org/metadata/dublin_core/Creator','http://bar.org 
>/bar.html',
>
>       'Ora Lassila').
>
>----- RDF API: ParseAndSerialize -----
>Exception in thread "main" aboutEach and aboutEachPrefix are not
>supported in the stream mode
>
>---------- end copy&paste ------

Francois-Paul Servant
33 1 45 54 46 72 ; 170 rue de Lourmel 75015 PARIS
mailto:hypersol@micronet.fr
http://www.hypersolutions.fr
Received on Thursday, 18 May 2000 18:29:25 GMT

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