W3C home > Mailing lists > Public > www-rdf-interest@w3.org > June 2004

Re: question about list and range of property

From: Libby Miller <Libby.Miller@bristol.ac.uk>
Date: Thu, 10 Jun 2004 18:48:53 +0100 (BST)
To: Shengping Liu <lsp@is.pku.edu.cn>
Cc: www-rdf-interest@w3.org
Message-ID: <Pine.GSO.4.58.0406101843460.817@mail.ilrt.bris.ac.uk>


hi

The best way to say someone knows multiple persons is like this:

<foaf:Person>
<foaf:name>Libby Miller</foaf:name>
<foaf:mbox rdf:resource="mailto:libby.miller@bristol.ac.uk" />
 <foaf:knows>
  <Person>
   <mbox_sha1sum>0a5eaa538253e5f5fdecf0c81065052f18f0ab25</mbox_sha1sum>
   <name>Craig Dibble</name>
  </Person>
 </foaf:knows>

 <foaf:knows>
  <Person>
   <mbox_sha1sum>46554fe08bec8edd3e94281377d641666ce7ecb5</mbox_sha1sum>
   <name>Martin Poulter</name>
  </Person>
 </foaf:knows>
</foaf:Person>

i.e. you just repeat the property knows. I would avoid using lists and
collections.

Try looking at the output of
http://www.ldodds.com/foaf/foaf-a-matic.html for examples.

cheers

Libby

On Fri, 11 Jun 2004, Shengping Liu wrote:

> Hi,
>   If in my RDF Schema,  the range of property knows is Person, i.e.,
> <knows, rdfs:range Person>
> then if some one knows many persons, can I write this in RDF?
> <Person rdf:ID="P1">
> <knows parseType="collection">
>        <Person rdf:resource="#P2">
>        <Person rdf:resource="#P3">
>     </knows>
> </Person>
>
> is this RDF file validated against the RDF Schema?
>
> 1)       If true: by the semantics of rdfs:range , an instance of
> rdf:List  would be  a Person, seems error;
> 2)       If false:  then I must define the range of property "knows" is
> rdf:List, but I can't constrict the list
> that only contains instances of  Person, and this definition would be
> contrary to the intuition
> and make RDF data aggregation difficult.
>
> What is your idea? Thanks!
>
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Shengping Liu
> Department of Information Science, Peking University, China.
>
> Phone: 86-10-62757175
> Mail:  lsp@is.pku.edu.cn
>
>
Received on Thursday, 10 June 2004 13:49:02 GMT

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