- From: Sean B. Palmer <sean@mysterylights.com>
- Date: Sun, 11 Nov 2001 14:15:16 -0000
- To: "Tim Berners-Lee" <timbl@w3.org>, "Dan Connolly" <connolly@w3.org>
- Cc: <www-archive+n3bugs@w3.org>
Hi,
There's something that I've been wanting to do in N3 rules fules for
some time now, but didn't raise the issue. Basically, I want to be
able to do a forEach loop on members of a DAML list, such that I can
say:-
this log:forAll :x , :y .
{ :x daml:oneOf :y } log:implies [ :forEach :z; :in :y; :do { :z a
:x } ] .
:ClubMember daml:oneOf (:John :Mary :Fred) .
and come up with:-
:John a :ClubMember .
:Mary a :ClubMember .
:Fred a :ClubMember .
Is there a way to do this already, or if not, is there some better way
than that outlined above?
This would be quite a useful thing, and I can provide another
application: unambiguous property sets. For example, DanBri uses the
property "foaf:mbox" as an unambiguous email property, but often
mailboxes are
shared: <mailto:fred_and_mary@example.org>. So we can define ":mail"
to mean "has one or more owners with different names", and then say
that if a node has both :mail and :name properties hanging off of it,
it is unambiguous.
(:mail :name) a :UnambiguousPropertySet .
I'm not actually sure how this would work... we want to end up with:-
this log:forAll :p , :q , :x , :y .
{ :p :mail :x; :name :y . :q :mail :x; :name :y } log:implies { :p
= :q } .
which is easy with:-
this log:forAll :a , :b , :p , :q , :x , :y .
{ (:a :b) a :UnambiguousPropertySet } log:implies
{ { :p :a :x; :b :y . :q :a :x; :b :y } log:implies { :p = :q } } .
but we want to be able to do it without knowing how many members of
the list there are.
--
Kindest Regards,
Sean B. Palmer
@prefix : <http://webns.net/roughterms/> .
:Sean :hasHomepage <http://purl.org/net/sbp/> .
Received on Sunday, 11 November 2001 09:16:05 UTC