W3C home > Mailing lists > Public > www-rdf-interest@w3.org > December 2002

cwm/n3 and naming blank nodes?

From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Sun, 01 Dec 2002 14:15:15 -0500
To: www-rdf-interest@w3.org
Message-ID: <87vg2da6v0.fsf@nwalsh.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello world,

Maybe there's already an easy way to do this, so let me just describe the problem
and see what the world says. I'm hacking about with my PIM in RDF.

Let's say I have a contact like this:

ab:jdoe a ab:Contact;
  ab:firstname "Jane";
  ab:surname "Doe";
  p:born "1970-01-01" .

- From such a record, I want to imply a yearly repeating appointment:

this log:forAll :p, :s, :o, :t, :u, :l, :k, :m.

{ :p a ab:Contact .
  :p p:born :o } log:implies { [ a db:Appointment ;
                                   db:begin-date :o ;
                                   db:repeat [
                                      rdf:type db:Repeat ;
                                      db:frequency "1";
                                      db:type "Yearly" ] ] } .

That's all well and good, but now suppose I have

ab:jdoe2 a ab:Contact;
  ab:firstname "John";
  ab:surname "Doe";
  p:born "1970-01-01" ;
  p:died "1999-12-31" .

For such a record, I want to imply a yearly repeating appointment with an end date:

{ :p a ab:Contact .
  :p p:born :o .
  :p p:died :s } log:implies { [ a db:Appointment ;
                                   db:begin-date :o ;
                                   db:repeat [
                                      rdf:type db:Repeat ;
                                      db:end :s ;
                                      db:frequency "1";
                                      db:type "Yearly" ] ] } .

But if I have both of these rules, then I get two appointments, one with an
end and one without.

If I could provide an identifier for the birthday event, I think I
could just add the db:end property if there was a p:died property, but
I can't think of any way to give names to these newly constructed
nodes.

Am I overlooking something? Is there some way to construct names automatically?
(For example, if ":p" in the expression is ab:jdoe, I'd be quite content
to imply a new "db:jdow-birthday" node that I could subsequently refer to.)

                                        Be seeing you,
                                          norm

- -- 
Norman.Walsh@Sun.COM    | We look back on our life as a thing of broken
XML Standards Architect | pieces, because our mistakes and failures are
Web Tech. and Standards | always the first to strike us, and outweigh
Sun Microsystems, Inc.  | in our imagination what we have accomplished
                        | and attained.--Goethe
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>

iD8DBQE96l/DOyltUcwYWjsRAkimAJsEepRY5lZZuod21Nugl3XXgbCqkACglFvn
h2THNVNaEFrjR4edztHfRsI=
=jIE2
-----END PGP SIGNATURE-----
Received on Sunday, 1 December 2002 14:16:28 GMT

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