W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > December 2007

Re: first pass implementation of Mark's chaining rules

From: Ivan Herman <ivan@w3.org>
Date: Mon, 10 Dec 2007 12:45:11 +0100
Message-ID: <475D26C7.3020102@w3.org>
To: Ben Adida <ben@adida.net>
Cc: RDFa <public-rdf-in-xhtml-tf@w3.org>
Still trying to understand:-)

Ben Adida wrote:
> Ivan Herman wrote:
>> Ben,
>> I have also implemented the parser (not installed yet, only on my
>> machine) but I do not know what the exact rules for @instanceof are, so
>> that is still missing. Can you give me a succinct, procedural definition?
> My read of Mark's rules is  that @instanceof always applies to the
> "subject". There are only two cases:
> <span about="#me" instanceof="foaf:Person" ....>
> applies to #me no matter what other attributes are around. (Note that
> #me may complete a hanging-rel, but that's independent of @instanceof.)

Yep, that is clear.

> <span instanceof="foo:bar">
> applies to a new bnode corresponding to the <span>, and there may be a
> hanging-rel completion with that new bnode as the object. 

Does it mean that this is equivalent to

<span about="_:q" instanceof="foo:bar">

where "_q" is a new BNode for each <span>? That works with the rest of
the rules, I believe, because

- _:q will be used to 'complete' the hanging-rel in the <span>'s parent
- _:q will be forwarded 'down' to the children just as if it was an
@about with a non-blank value.

Hm. This may not be o.k. When should such new blank node appear and when
shouldn't it? If I have

<div about="#a" rel="a:b" href="http://a.b.c">
   <span instanceof="q:r">

I would expect to get

<http://a.b.c> rdf:type q:r.

Ie, in this case, the lonely @instanceof should _not_ generate a BNode,
right? So when should that extra bnode be generated?

> In both cases, the subject of contained HTML and additional attributes
> on the same element is set to the subject of the @instanceof.
> If you take a look at my test file and how my code parses it, all
> examples mentioned above are covered.

So what happens to the

<span instanceof="foo:bar" rel="a:b" resource="p:q">


I guess this would yield

_:q a   foo:bar;
    a:b p:q.

which is pretty much in line with the way you interpreted

<span instanceof="foaf:Person" property="foaf:knows">Mark</span>

But one of our use case that actually started the whole discussion on
@instanceof ages ago was:

<img rel="a:img" href="http://a.b.c/d.png" instanceof="b:imgtype"/>

where what would have liked is to get:

subj a:img <http://a.b.c/d.png>.
<http://a.b.c/d.png> rdf:type b:imgtype.

(where subj is the 'inherited' subject. The original use case was with
foaf namespace properties, but I am lazy to find out exactly which ones:-).

Along the interpretation above I would get, instead:

subj a:img <http://a.b.c/d.png>;
     rdf:type b:imgtype.



> -Ben


Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Monday, 10 December 2007 11:45:16 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:25 UTC